summaryrefslogtreecommitdiff
path: root/Zend/zend_closures.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2018-08-22 10:43:51 +0300
committerDmitry Stogov <dmitry@zend.com>2018-08-22 10:43:51 +0300
commit8d95f561e45b5aee5398c772284bdeff03fbb475 (patch)
treec4f7ff42cf5b970ba1a0de35eead769567c1200e /Zend/zend_closures.c
parent0f68ff5c92924deb9401ce66458e67f250ccde74 (diff)
downloadphp-git-8d95f561e45b5aee5398c772284bdeff03fbb475.tar.gz
Stop using zend_function->reserved[] space.
Diffstat (limited to 'Zend/zend_closures.c')
-rw-r--r--Zend/zend_closures.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Zend/zend_closures.c b/Zend/zend_closures.c
index 494c889221..56808e2496 100644
--- a/Zend/zend_closures.c
+++ b/Zend/zend_closures.c
@@ -234,7 +234,8 @@ static ZEND_NAMED_FUNCTION(zend_closure_call_magic) /* {{{ */ {
fci.size = sizeof(zend_fcall_info);
fci.retval = return_value;
- fcc.function_handler = (zend_function *) EX(func)->internal_function.reserved[0];
+ fcc.function_handler = (EX(func)->internal_function.fn_flags & ZEND_ACC_STATIC) ?
+ EX(func)->internal_function.scope->__callstatic : EX(func)->internal_function.scope->__call;
fci.params = params;
fci.param_count = 2;
ZVAL_STR(&fci.params[0], EX(func)->common.function_name);
@@ -270,9 +271,9 @@ static int zend_create_closure_from_callable(zval *return_value, zval *callable,
memset(&call, 0, sizeof(zend_internal_function));
call.type = ZEND_INTERNAL_FUNCTION;
+ call.fn_flags = mptr->common.fn_flags & ZEND_ACC_STATIC;
call.handler = zend_closure_call_magic;
call.function_name = mptr->common.function_name;
- call.reserved[0] = mptr->op_array.reserved[0];
call.scope = mptr->common.scope;
zend_free_trampoline(mptr);