summaryrefslogtreecommitdiff
path: root/ext/reflection/php_reflection.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2015-06-12 12:33:23 +0300
committerDmitry Stogov <dmitry@zend.com>2015-06-12 12:33:23 +0300
commit8e10e8f921101e0787c8228d257107a204de3e36 (patch)
tree35bad438a9a49a94a7f0b1e061538e03a49e2b78 /ext/reflection/php_reflection.c
parent730d7b8fcad30addc80d685e046b5f05bb3d0190 (diff)
downloadphp-git-8e10e8f921101e0787c8228d257107a204de3e36.tar.gz
Avoid zval duplication in ZVAL_ZVAL() macro (it was necessary only in few places).
Switch from ZVAL_ZVAL() to simpler macros where possible (it makes sense to review remaining places)
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r--ext/reflection/php_reflection.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index d2ccfe4442..bdb388c570 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -1720,7 +1720,7 @@ ZEND_METHOD(reflection_function, getClosureThis)
if (!Z_ISUNDEF(intern->obj)) {
closure_this = zend_get_closure_this_ptr(&intern->obj);
if (!Z_ISUNDEF_P(closure_this)) {
- RETURN_ZVAL(closure_this, 1, 0);
+ ZVAL_COPY(return_value, closure_this);
}
}
}
@@ -3153,7 +3153,7 @@ ZEND_METHOD(reflection_method, getClosure)
if (Z_OBJCE_P(obj) == zend_ce_closure &&
(mptr->internal_function.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE))
{
- RETURN_ZVAL(obj, 1, 0);
+ ZVAL_COPY(return_value, obj);
} else {
zend_create_closure(return_value, mptr, mptr->common.scope, Z_OBJCE_P(obj), obj);
}