summaryrefslogtreecommitdiff
path: root/ext/reflection/php_reflection.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2018-07-04 19:22:24 +0300
committerDmitry Stogov <dmitry@zend.com>2018-07-04 19:22:24 +0300
commit4a475a4976db92e71949786cdf5990c61514261e (patch)
tree6934c9e00200e6388256656b8fa71c97a1a3a158 /ext/reflection/php_reflection.c
parentd798fd491be77943fb751ad97d85475bf324192c (diff)
downloadphp-git-4a475a4976db92e71949786cdf5990c61514261e.tar.gz
Replace legacy zval_dtor() by zval_ptr_dtor_nogc() or even more specialized destructors.
zval_dtor() doesn't make a lot of sense in PHP-7.* and it's used incorrectly in some places. Its occurances should be replaced by zval_ptr_dtor() or zval_ptr_dtor_nogc(), or even more specialized destructors.
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r--ext/reflection/php_reflection.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 03590d47e7..a793536d8d 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -1452,7 +1452,7 @@ ZEND_METHOD(reflection, export)
/* Invoke the __toString() method */
ZVAL_STRINGL(&fname, "__tostring", sizeof("__tostring") - 1);
result= call_user_function(NULL, object, &fname, &retval, 0, NULL);
- zval_dtor(&fname);
+ zval_ptr_dtor_str(&fname);
if (result == FAILURE) {
_DO_THROW("Invocation of method __toString() failed");
@@ -2976,7 +2976,7 @@ ZEND_METHOD(reflection_method, __construct)
zend_throw_exception_ex(reflection_exception_ptr, 0,
"Class %s does not exist", Z_STRVAL_P(classname));
if (classname == &ztmp) {
- zval_dtor(&ztmp);
+ zval_ptr_dtor_str(&ztmp);
}
return;
}
@@ -2988,14 +2988,14 @@ ZEND_METHOD(reflection_method, __construct)
default:
if (classname == &ztmp) {
- zval_dtor(&ztmp);
+ zval_ptr_dtor_str(&ztmp);
}
_DO_THROW("The parameter class is expected to be either a string or an object");
/* returns out of this function */
}
if (classname == &ztmp) {
- zval_dtor(&ztmp);
+ zval_ptr_dtor_str(&ztmp);
}
lcname = zend_str_tolower_dup(name_str, name_len);