mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
Add logical XOR, proves to be quite useful lately
This commit is contained in:
parent
6f53e48bb9
commit
fe9b5870af
@ -361,6 +361,9 @@ typedef int (*zend_write_func_t)(const char *str, uint str_length);
|
||||
#define ZEND_STRS(str) (str), (sizeof(str))
|
||||
#define ZEND_NORMALIZE_BOOL(n) \
|
||||
((n) ? (((n)>0) ? 1 : -1) : 0)
|
||||
#define ZEND_TRUTH(x) ((x) ? 1 : 0)
|
||||
#define ZEND_LOG_XOR(a, b) (ZEND_TRUTH(a) ^ ZEND_TRUTH(b))
|
||||
|
||||
|
||||
|
||||
/* data types */
|
||||
|
Loading…
Reference in New Issue
Block a user