From: Dmitry Stogov Date: Mon, 22 Jan 2018 13:10:33 +0000 (+0300) Subject: Use OBJ_FLAGS() macro to access object flags (even if they are currently stored toget... X-Git-Tag: php-7.3.0alpha1~562 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a561d6a6eee5dcf34272f7c9edf390ed25186dad;p=php Use OBJ_FLAGS() macro to access object flags (even if they are currently stored together with GC_FLAGS) --- diff --git a/ext/standard/var_unserializer.c b/ext/standard/var_unserializer.c index b42e905f07..93df5ae6c2 100644 --- a/ext/standard/var_unserializer.c +++ b/ext/standard/var_unserializer.c @@ -223,13 +223,13 @@ PHPAPI void var_destroy(php_unserialize_data_t *var_hashx) BG(serialize_lock)++; if (call_user_function_ex(CG(function_table), zv, &wakeup_name, &retval, 0, 0, 1, NULL) == FAILURE || Z_ISUNDEF(retval)) { wakeup_failed = 1; - GC_FLAGS(Z_OBJ_P(zv)) |= IS_OBJ_DESTRUCTOR_CALLED; + OBJ_FLAGS(Z_OBJ_P(zv)) |= IS_OBJ_DESTRUCTOR_CALLED; } BG(serialize_lock)--; zval_ptr_dtor(&retval); } else { - GC_FLAGS(Z_OBJ_P(zv)) |= IS_OBJ_DESTRUCTOR_CALLED; + OBJ_FLAGS(Z_OBJ_P(zv)) |= IS_OBJ_DESTRUCTOR_CALLED; } } @@ -603,7 +603,7 @@ static inline int object_common2(UNSERIALIZE_PARAMETER, zend_long elements) if (!process_nested_data(UNSERIALIZE_PASSTHRU, ht, elements, 1)) { if (has_wakeup) { ZVAL_DEREF(rval); - GC_FLAGS(Z_OBJ_P(rval)) |= IS_OBJ_DESTRUCTOR_CALLED; + OBJ_FLAGS(Z_OBJ_P(rval)) |= IS_OBJ_DESTRUCTOR_CALLED; } return 0; } diff --git a/ext/standard/var_unserializer.re b/ext/standard/var_unserializer.re index 00507b0854..c7a9d2e33b 100644 --- a/ext/standard/var_unserializer.re +++ b/ext/standard/var_unserializer.re @@ -221,13 +221,13 @@ PHPAPI void var_destroy(php_unserialize_data_t *var_hashx) BG(serialize_lock)++; if (call_user_function_ex(CG(function_table), zv, &wakeup_name, &retval, 0, 0, 1, NULL) == FAILURE || Z_ISUNDEF(retval)) { wakeup_failed = 1; - GC_FLAGS(Z_OBJ_P(zv)) |= IS_OBJ_DESTRUCTOR_CALLED; + OBJ_FLAGS(Z_OBJ_P(zv)) |= IS_OBJ_DESTRUCTOR_CALLED; } BG(serialize_lock)--; zval_ptr_dtor(&retval); } else { - GC_FLAGS(Z_OBJ_P(zv)) |= IS_OBJ_DESTRUCTOR_CALLED; + OBJ_FLAGS(Z_OBJ_P(zv)) |= IS_OBJ_DESTRUCTOR_CALLED; } } @@ -607,7 +607,7 @@ static inline int object_common2(UNSERIALIZE_PARAMETER, zend_long elements) if (!process_nested_data(UNSERIALIZE_PASSTHRU, ht, elements, 1)) { if (has_wakeup) { ZVAL_DEREF(rval); - GC_FLAGS(Z_OBJ_P(rval)) |= IS_OBJ_DESTRUCTOR_CALLED; + OBJ_FLAGS(Z_OBJ_P(rval)) |= IS_OBJ_DESTRUCTOR_CALLED; } return 0; }