summaryrefslogtreecommitdiff
path: root/Zend/zend_variables.h
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_variables.h')
-rw-r--r--Zend/zend_variables.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/Zend/zend_variables.h b/Zend/zend_variables.h
index 4f840bdd8a..ea0434dc0b 100644
--- a/Zend/zend_variables.h
+++ b/Zend/zend_variables.h
@@ -22,6 +22,8 @@
#ifndef ZEND_VARIABLES_H
#define ZEND_VARIABLES_H
+#include "zend_types.h"
+#include "zend_gc.h"
BEGIN_EXTERN_C()
@@ -43,6 +45,17 @@ static zend_always_inline void _zval_ptr_dtor_nogc(zval *zval_ptr ZEND_FILE_LINE
}
}
+static zend_always_inline void i_zval_ptr_dtor(zval *zval_ptr ZEND_FILE_LINE_DC TSRMLS_DC)
+{
+ if (Z_REFCOUNTED_P(zval_ptr)) {
+ if (!Z_DELREF_P(zval_ptr)) {
+ _zval_dtor_func_for_ptr(Z_COUNTED_P(zval_ptr) ZEND_FILE_LINE_RELAY_CC);
+ } else {
+ GC_ZVAL_CHECK_POSSIBLE_ROOT(zval_ptr);
+ }
+ }
+}
+
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)