]> granicus.if.org Git - php/commitdiff
Use OBJ_FLAGS() macro to access object flags (even if they are currently stored toget...
authorDmitry Stogov <dmitry@zend.com>
Mon, 22 Jan 2018 13:10:33 +0000 (16:10 +0300)
committerDmitry Stogov <dmitry@zend.com>
Mon, 22 Jan 2018 13:10:33 +0000 (16:10 +0300)
ext/standard/var_unserializer.c
ext/standard/var_unserializer.re

index b42e905f0750bd2f3bd714a5b04f6dc0dfcd7100..93df5ae6c29e50e867499587dab7cf507faf941f 100644 (file)
@@ -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;
        }
index 00507b085436ecb08bc9ec3f39657e9614710123..c7a9d2e33bdd550d2f5adb5eb6b2aad11ccce13b 100644 (file)
@@ -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;
        }