mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Export argument type checking functions
This commit is contained in:
parent
5b017ba8be
commit
a658465ef2
2 changed files with 24 additions and 9 deletions
|
@ -567,7 +567,7 @@ static inline int make_real_object(zval *object)
|
|||
return 1;
|
||||
}
|
||||
|
||||
ZEND_API char * zend_verify_internal_arg_class_kind(const zend_internal_arg_info *cur_arg_info, char **class_name, zend_class_entry **pce)
|
||||
static char * zend_verify_internal_arg_class_kind(const zend_internal_arg_info *cur_arg_info, char **class_name, zend_class_entry **pce)
|
||||
{
|
||||
zend_string *key;
|
||||
ALLOCA_FLAG(use_heap);
|
||||
|
@ -589,7 +589,7 @@ static zend_always_inline zend_class_entry* zend_verify_arg_class_kind(const zen
|
|||
return zend_fetch_class(cur_arg_info->class_name, (ZEND_FETCH_CLASS_AUTO | ZEND_FETCH_CLASS_NO_AUTOLOAD));
|
||||
}
|
||||
|
||||
ZEND_API void zend_verify_arg_error(const zend_function *zf, uint32_t arg_num, const char *need_msg, const char *need_kind, const char *given_msg, const char *given_kind, zval *arg)
|
||||
static void zend_verify_arg_error(const zend_function *zf, uint32_t arg_num, const char *need_msg, const char *need_kind, const char *given_msg, const char *given_kind, zval *arg)
|
||||
{
|
||||
zend_execute_data *ptr = EG(current_execute_data)->prev_execute_data;
|
||||
const char *fname = ZSTR_VAL(zf->common.function_name);
|
||||
|
@ -869,7 +869,7 @@ static zend_always_inline int zend_verify_missing_arg(zend_execute_data *execute
|
|||
return 0;
|
||||
}
|
||||
|
||||
ZEND_API void zend_verify_return_error(const zend_function *zf, const char *need_msg, const char *need_kind, const char *returned_msg, const char *returned_kind)
|
||||
static void zend_verify_return_error(const zend_function *zf, const char *need_msg, const char *need_kind, const char *returned_msg, const char *returned_kind)
|
||||
{
|
||||
const char *fname = ZSTR_VAL(zf->common.function_name);
|
||||
const char *fsep;
|
||||
|
@ -893,7 +893,7 @@ ZEND_API void zend_verify_return_error(const zend_function *zf, const char *need
|
|||
}
|
||||
}
|
||||
|
||||
ZEND_API void zend_verify_internal_return_error(const zend_function *zf, const char *need_msg, const char *need_kind, const char *returned_msg, const char *returned_kind)
|
||||
static void zend_verify_internal_return_error(const zend_function *zf, const char *need_msg, const char *need_kind, const char *returned_msg, const char *returned_kind)
|
||||
{
|
||||
const char *fname = ZSTR_VAL(zf->common.function_name);
|
||||
const char *fsep;
|
||||
|
@ -2667,10 +2667,26 @@ ZEND_API user_opcode_handler_t zend_get_user_opcode_handler(zend_uchar opcode)
|
|||
return zend_user_opcode_handlers[opcode];
|
||||
}
|
||||
|
||||
ZEND_API zval *zend_get_zval_ptr(int op_type, const znode_op *node, const zend_execute_data *execute_data, zend_free_op *should_free, int type) {
|
||||
ZEND_API zval *zend_get_zval_ptr(int op_type, const znode_op *node, const zend_execute_data *execute_data, zend_free_op *should_free, int type)
|
||||
{
|
||||
return get_zval_ptr(op_type, *node, execute_data, should_free, type);
|
||||
}
|
||||
|
||||
ZEND_API ZEND_FASTCALL void zend_check_internal_arg_type(zend_function *zf, uint32_t arg_num, zval *arg)
|
||||
{
|
||||
zend_verify_internal_arg_type(zf, arg_num, arg);
|
||||
}
|
||||
|
||||
ZEND_API ZEND_FASTCALL int zend_check_arg_type(zend_function *zf, uint32_t arg_num, zval *arg, zval *default_value, void **cache_slot)
|
||||
{
|
||||
return zend_verify_arg_type(zf, arg_num, arg, default_value, cache_slot);
|
||||
}
|
||||
|
||||
ZEND_API ZEND_FASTCALL int zend_check_missing_arg(zend_execute_data *execute_data, uint32_t arg_num, void **cache_slot)
|
||||
{
|
||||
return zend_verify_missing_arg(execute_data, arg_num, cache_slot);
|
||||
}
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
|
|
|
@ -49,10 +49,9 @@ ZEND_API int zend_eval_stringl(char *str, size_t str_len, zval *retval_ptr, char
|
|||
ZEND_API int zend_eval_string_ex(char *str, zval *retval_ptr, char *string_name, int handle_exceptions);
|
||||
ZEND_API int zend_eval_stringl_ex(char *str, size_t str_len, zval *retval_ptr, char *string_name, int handle_exceptions);
|
||||
|
||||
ZEND_API char * zend_verify_internal_arg_class_kind(const zend_internal_arg_info *cur_arg_info, char **class_name, zend_class_entry **pce);
|
||||
ZEND_API void zend_verify_arg_error(const zend_function *zf, uint32_t arg_num, const char *need_msg, const char *need_kind, const char *given_msg, const char *given_kind, zval *arg);
|
||||
ZEND_API void zend_verify_return_error(const zend_function *zf, const char *need_msg, const char *need_kind, const char *returned_msg, const char *returned_kind);
|
||||
ZEND_API void zend_verify_internal_return_error(const zend_function *zf, const char *need_msg, const char *need_kind, const char *returned_msg, const char *returned_kind);
|
||||
ZEND_API ZEND_FASTCALL void zend_check_internal_arg_type(zend_function *zf, uint32_t arg_num, zval *arg);
|
||||
ZEND_API ZEND_FASTCALL int zend_check_arg_type(zend_function *zf, uint32_t arg_num, zval *arg, zval *default_value, void **cache_slot);
|
||||
ZEND_API ZEND_FASTCALL int zend_check_missing_arg(zend_execute_data *execute_data, uint32_t arg_num, void **cache_slot);
|
||||
|
||||
static zend_always_inline zval* zend_assign_to_variable(zval *variable_ptr, zval *value, zend_uchar value_type)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue