summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-11-19 10:29:32 +0100
committerNikita Popov <nikita.ppv@gmail.com>2020-11-19 10:29:32 +0100
commit46b9e0c874bedc90ea092099fa7d0be11395148c (patch)
tree6ab65ed347a7cdee3770426f46bac14a1b5846db
parent06c4a501fdfb800d93725c4bb2b8b95e397ce07c (diff)
downloadphp-git-46b9e0c874bedc90ea092099fa7d0be11395148c.tar.gz
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.
-rw-r--r--Zend/zend_API.c4
-rw-r--r--Zend/zend_API.h3
2 files changed, 5 insertions, 2 deletions
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);