com php-src: Merge branch 'PHP-7.4': Zend/zend_API.c

From: Date: Mon, 11 Mar 2019 13:33:07 +0000
Subject: com php-src: Merge branch 'PHP-7.4': Zend/zend_API.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-105079@lists.php.net to get a copy of this message
Commit: 92291ab72692949b63cc019d824bfe17aa5ec720 Author: Nikita Popov <nikita.ppv@gmail.com> Mon, 11 Mar 2019 14:33:07 +0100 Parents: e279c80247bf9f029d0a0b34fff8e0a90ebbf3ac ac79d42ba6ed05c5dcb611b66cdad07f3bcbba58 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=92291ab72692949b63cc019d824bfe17aa5ec720 Log: Merge branch 'PHP-7.4' Changed paths: MM Zend/zend_API.c Diff: diff --cc Zend/zend_API.c index 4a31914,80a9752..ad15a38 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@@ -2792,6 -2907,19 +2792,16 @@@ static int zend_is_callable_check_class } /* }}} */ + static void free_fcc(zend_fcall_info_cache *fcc) { + if (fcc->function_handler && - ((fcc->function_handler->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) || - fcc->function_handler->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY || - fcc->function_handler->type == ZEND_OVERLOADED_FUNCTION)) { - if (fcc->function_handler->type != ZEND_OVERLOADED_FUNCTION && - fcc->function_handler->common..function_name) { ++ (fcc->function_handler->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE)) { ++ if (fcc->function_handler->common.function_name) { + zend_string_release_ex(fcc->function_handler->common.function_name, 0); + } + zend_free_trampoline(fcc->function_handler); + } + } + static zend_always_inline int zend_is_callable_check_func(int check_flags, zval *callable, zend_fcall_info_cache *fcc, int strict_class, char **error) /* {{{ */ { zend_class_entry *ce_org = fcc->calling_scope; @@@ -3203,8 -3349,11 +3208,11 @@@ check_func } return 0; case IS_OBJECT: - if (Z_OBJ_HANDLER_P(callable, get_closure) && Z_OBJ_HANDLER_P(callable, get_closure)(callable, &fcc->calling_scope, &fcc->function_handler, &fcc->object) == SUCCESS) { + if (Z_OBJ_HANDLER_P(callable, get_closure) && Z_OBJ_HANDLER_P(callable, get_closure)(Z_OBJ_P(callable), &fcc->calling_scope, &fcc->function_handler, &fcc->object) == SUCCESS) { fcc->called_scope = fcc->calling_scope; + if (fcc == &fcc_local) { + free_fcc(fcc); + } return 1; } if (error) *error = estrdup("no array or string given");

« previous php.cvs (#105079) next »