mirror of
https://github.com/php/php-src.git
synced 2026-04-18 05:21:02 +02:00
Use OBJ_FLAGS() macro to access object flags (even if they are currently stored together with GC_FLAGS)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user