diff options
Diffstat (limited to 'Zend/zend_variables.h')
-rw-r--r-- | Zend/zend_variables.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Zend/zend_variables.h b/Zend/zend_variables.h index c55ce233a5..538d2a5566 100644 --- a/Zend/zend_variables.h +++ b/Zend/zend_variables.h @@ -36,6 +36,13 @@ static zend_always_inline void _zval_dtor(zval *zvalue ZEND_FILE_LINE_DC) _zval_dtor_func(Z_COUNTED_P(zvalue) ZEND_FILE_LINE_RELAY_CC); } +static zend_always_inline void _zval_ptr_dtor_nogc(zval *zval_ptr ZEND_FILE_LINE_DC) +{ + if (Z_REFCOUNTED_P(zval_ptr) && !Z_DELREF_P(zval_ptr)) { + _zval_dtor_func_for_ptr(Z_COUNTED_P(zval_ptr) ZEND_FILE_LINE_CC); + } +} + ZEND_API void _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC); #define zval_copy_ctor_func(zv) _zval_copy_ctor_func(zv ZEND_FILE_LINE_CC) @@ -98,6 +105,7 @@ ZEND_API void _zval_dtor_wrapper(zval *zvalue); #define zval_opt_copy_ctor_no_imm(zvalue) _zval_opt_copy_ctor_no_imm((zvalue) ZEND_FILE_LINE_CC) #define zval_dtor(zvalue) _zval_dtor((zvalue) ZEND_FILE_LINE_CC) #define zval_ptr_dtor(zval_ptr) _zval_ptr_dtor((zval_ptr) ZEND_FILE_LINE_CC) +#define zval_ptr_dtor_nogc(zval_ptr) _zval_ptr_dtor_nogc((zval_ptr) ZEND_FILE_LINE_CC) #define zval_internal_dtor(zvalue) _zval_internal_dtor((zvalue) ZEND_FILE_LINE_CC) #define zval_internal_ptr_dtor(zvalue) _zval_internal_ptr_dtor((zvalue) ZEND_FILE_LINE_CC) #define zval_dtor_wrapper _zval_dtor_wrapper |