Skip to content

Commit 8319f59

Browse files
committed
Moved i_zval_ptr_dtor() from zend_execute.h to zend_variables.h
1 parent e07feea commit 8319f59

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

Zend/zend_execute.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,6 @@ ZEND_API int zend_eval_stringl_ex(char *str, size_t str_len, zval *retval_ptr, c
5151
ZEND_API char * zend_verify_arg_class_kind(const zend_arg_info *cur_arg_info, char **class_name, zend_class_entry **pce TSRMLS_DC);
5252
ZEND_API void zend_verify_arg_error(int error_type, const zend_function *zf, uint32_t arg_num, const char *need_msg, const char *need_kind, const char *given_msg, const char *given_kind, zval *arg TSRMLS_DC);
5353

54-
static zend_always_inline void i_zval_ptr_dtor(zval *zval_ptr ZEND_FILE_LINE_DC TSRMLS_DC)
55-
{
56-
if (Z_REFCOUNTED_P(zval_ptr)) {
57-
if (!Z_DELREF_P(zval_ptr)) {
58-
_zval_dtor_func_for_ptr(Z_COUNTED_P(zval_ptr) ZEND_FILE_LINE_RELAY_CC);
59-
} else {
60-
GC_ZVAL_CHECK_POSSIBLE_ROOT(zval_ptr);
61-
}
62-
}
63-
}
64-
6554
static zend_always_inline int i_zend_is_true(zval *op TSRMLS_DC)
6655
{
6756
int result;

Zend/zend_variables.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
#ifndef ZEND_VARIABLES_H
2323
#define ZEND_VARIABLES_H
2424

25+
#include "zend_types.h"
26+
#include "zend_gc.h"
2527

2628
BEGIN_EXTERN_C()
2729

@@ -43,6 +45,17 @@ static zend_always_inline void _zval_ptr_dtor_nogc(zval *zval_ptr ZEND_FILE_LINE
4345
}
4446
}
4547

48+
static zend_always_inline void i_zval_ptr_dtor(zval *zval_ptr ZEND_FILE_LINE_DC TSRMLS_DC)
49+
{
50+
if (Z_REFCOUNTED_P(zval_ptr)) {
51+
if (!Z_DELREF_P(zval_ptr)) {
52+
_zval_dtor_func_for_ptr(Z_COUNTED_P(zval_ptr) ZEND_FILE_LINE_RELAY_CC);
53+
} else {
54+
GC_ZVAL_CHECK_POSSIBLE_ROOT(zval_ptr);
55+
}
56+
}
57+
}
58+
4659
ZEND_API void _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC);
4760

4861
#define zval_copy_ctor_func(zv) _zval_copy_ctor_func(zv ZEND_FILE_LINE_CC)

0 commit comments

Comments
 (0)