diff options
author | Bob Weinand <bobwei9@hotmail.com> | 2016-05-05 23:31:57 +0200 |
---|---|---|
committer | Bob Weinand <bobwei9@hotmail.com> | 2016-05-05 23:31:57 +0200 |
commit | bac6fdb0c52c924e726c5a78de8858bf27b6586b (patch) | |
tree | 627f2ec8d91955e99456783aebd94ac5d4236f32 /Zend/zend_API.c | |
parent | 59f35c0ca9abfa72c5393f6c0350759a3f6512d8 (diff) | |
download | php-git-bac6fdb0c52c924e726c5a78de8858bf27b6586b.tar.gz |
Refactor zval cleanup into single function
Also use zval_ptr_dtor_nogc() everywhere in Zend in favor of zval_dtor()
Diffstat (limited to 'Zend/zend_API.c')
-rw-r--r-- | Zend/zend_API.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c index f646883435..d006b7f2a0 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -463,7 +463,7 @@ ZEND_API int ZEND_FASTCALL zend_parse_arg_str_weak(zval *arg, zend_string **dest Z_ADDREF_P(z); if (Z_TYPE_P(z) != IS_OBJECT) { - zval_dtor(arg); + zval_ptr_dtor_nogc(arg); ZVAL_NULL(arg); if (!zend_make_printable_zval(z, arg)) { ZVAL_COPY_VALUE(arg, z); @@ -3386,7 +3386,7 @@ ZEND_API zend_bool zend_make_callable(zval *callable, zend_string **callable_nam if (zend_is_callable_ex(callable, NULL, IS_CALLABLE_STRICT, callable_name, &fcc, NULL)) { if (Z_TYPE_P(callable) == IS_STRING && fcc.calling_scope) { - zval_dtor(callable); + zval_ptr_dtor_nogc(callable); array_init(callable); add_next_index_str(callable, zend_string_copy(fcc.calling_scope->name)); add_next_index_str(callable, zend_string_copy(fcc.function_handler->common.function_name)); @@ -3951,7 +3951,7 @@ ZEND_API int zend_update_static_property(zend_class_entry *scope, const char *na } else { if (property != value) { if (Z_ISREF_P(property)) { - zval_dtor(property); + zval_ptr_dtor_nogc(property); ZVAL_COPY_VALUE(property, value); if (Z_REFCOUNTED_P(value) && Z_REFCOUNT_P(value) > 0) { zval_opt_copy_ctor(property); |