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.
This commit is contained in:
Nikita Popov 2020-11-19 10:29:32 +01:00
parent 06c4a501fd
commit 46b9e0c874
2 changed files with 5 additions and 2 deletions

View File

@ -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);
}

View File

@ -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);