Use ZEND_HASH_APPLY_SHIFT macro instead of hard-coded literal

This commit is contained in:
Thomas Punt 2017-08-22 13:32:47 +01:00 committed by Nikita Popov
parent 5a2a92f128
commit d938a769b2

View file

@ -74,7 +74,7 @@ static void _zend_is_inconsistent(const HashTable *ht, const char *file, int lin
#define HASH_PROTECT_RECURSION(ht) \
if ((ht)->u.flags & HASH_FLAG_APPLY_PROTECTION) { \
if (((ht)->u.flags & ZEND_HASH_APPLY_COUNT_MASK) >= (3 << 8)) { \
if (((ht)->u.flags & ZEND_HASH_APPLY_COUNT_MASK) >= (3 << ZEND_HASH_APPLY_SHIFT)) {\
zend_error_noreturn(E_ERROR, "Nesting level too deep - recursive dependency?");\
} \
ZEND_HASH_INC_APPLY_COUNT(ht); \