From: Nikita Popov Date: Thu, 19 Nov 2020 09:29:32 +0000 (+0100) Subject: Export zend_is_callable_at_frame X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=46b9e0c874bedc90ea092099fa7d0be11395148c;p=php Export zend_is_callable_at_frame Export the zend_is_callable_impl() function as zend_is_callable_at_frame() for use by extension. As twose pointed out, an extension may want to retrieve fcc for a private method. --- diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 773c38f979..58b743e641 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -3307,7 +3307,7 @@ ZEND_API zend_string *zend_get_callable_name(zval *callable) /* {{{ */ } /* }}} */ -static zend_always_inline zend_bool zend_is_callable_impl( +ZEND_API zend_bool zend_is_callable_at_frame( zval *callable, zend_object *object, zend_execute_data *frame, uint32_t check_flags, zend_fcall_info_cache *fcc, char **error) /* {{{ */ { @@ -3436,7 +3436,7 @@ ZEND_API zend_bool zend_is_callable_ex(zval *callable, zend_object *object, uint frame = frame->prev_execute_data; } - zend_bool ret = zend_is_callable_impl(callable, object, frame, check_flags, fcc, error); + zend_bool ret = zend_is_callable_at_frame(callable, object, frame, check_flags, fcc, error); if (callable_name) { *callable_name = zend_get_callable_name_ex(callable, object); } diff --git a/Zend/zend_API.h b/Zend/zend_API.h index 0b6808b678..290db040b2 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -352,6 +352,9 @@ ZEND_API ZEND_COLD void zend_wrong_param_count(void); ZEND_API void zend_release_fcall_info_cache(zend_fcall_info_cache *fcc); ZEND_API zend_string *zend_get_callable_name_ex(zval *callable, zend_object *object); ZEND_API zend_string *zend_get_callable_name(zval *callable); +ZEND_API zend_bool zend_is_callable_at_frame( + zval *callable, zend_object *object, zend_execute_data *frame, + uint32_t check_flags, zend_fcall_info_cache *fcc, char **error); ZEND_API zend_bool zend_is_callable_ex(zval *callable, zend_object *object, uint32_t check_flags, zend_string **callable_name, zend_fcall_info_cache *fcc, char **error); ZEND_API zend_bool zend_is_callable(zval *callable, uint32_t check_flags, zend_string **callable_name); ZEND_API zend_bool zend_make_callable(zval *callable, zend_string **callable_name);