From 59356126664584e0a67128acad161f8bd86381fa Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Fri, 20 Mar 2015 16:04:04 +0300 Subject: Improved type hinting: EX_PREV_USES_STRICT_TYPES() and family changed/renamed to fit with other macros Optimized zend_verify_internal_arg_type() and family (they don't need "strict" argument anymore) Standerd ZPP is called from VM only for weak type check or strict exception (int -> double) Fixed ZEND_RECV_VARIADIC Fixed ZEND_STRLEN TODO: should we accept IS_NULL for non-nullable arguments? --- Zend/zend_API.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Zend/zend_API.c') diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 1ef695dd4e..c626a8ddd7 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -151,7 +151,7 @@ ZEND_API int zend_copy_parameters_array(int param_count, zval *argument_array) / ZEND_API void zend_wrong_param_count(void) /* {{{ */ { - if (EX_PREV_USES_STRICT_TYPES()) { + if (ZEND_ARG_USES_STRICT_TYPES()) { zend_wrong_param_count_ex(1); } else { zend_wrong_param_count_ex(0); @@ -802,7 +802,7 @@ ZEND_API int zend_parse_parameters_ex(int flags, int num_args, const char *type_ va_list va; int retval; - if (EX_PREV_USES_STRICT_TYPES()) { + if (ZEND_ARG_USES_STRICT_TYPES()) { flags |= ZEND_PARSE_PARAMS_STRICT; } @@ -822,7 +822,7 @@ ZEND_API int zend_parse_parameters(int num_args, const char *type_spec, ...) /* int retval; int flags = 0; - if (EX_PREV_USES_STRICT_TYPES()) { + if (ZEND_ARG_USES_STRICT_TYPES()) { flags |= ZEND_PARSE_PARAMS_STRICT; } @@ -851,7 +851,7 @@ ZEND_API int zend_parse_method_parameters(int num_args, zval *this_ptr, const ch * wrong branch here. */ zend_bool is_method = EG(current_execute_data)->func->common.scope != NULL; - if (EX_PREV_USES_STRICT_TYPES()) { + if (ZEND_ARG_USES_STRICT_TYPES()) { flags |= ZEND_PARSE_PARAMS_STRICT; } @@ -891,7 +891,7 @@ ZEND_API int zend_parse_method_parameters_ex(int flags, int num_args, zval *this zval **object; zend_class_entry *ce; - if (EX_PREV_USES_STRICT_TYPES()) { + if (ZEND_ARG_USES_STRICT_TYPES()) { flags |= ZEND_PARSE_PARAMS_STRICT; } -- cgit v1.2.1