From 8e10e8f921101e0787c8228d257107a204de3e36 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Fri, 12 Jun 2015 12:33:23 +0300 Subject: 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) --- ext/reflection/php_reflection.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/reflection/php_reflection.c') 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); } -- cgit v1.2.1