com php-src: Remove more leftovers from invalid static calls: Zend/zend_API.c Zend/zend_API.h

From: Date: Wed, 30 Jan 2019 12:13:47 +0000
Subject: com php-src: Remove more leftovers from invalid static calls: Zend/zend_API.c Zend/zend_API.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-104404@lists.php.net to get a copy of this message
Commit: e93bbf4d5d2812c698a4711fc0ff751b170bdf2b Author: Nikita Popov <nikita.ppv@gmail.com> Wed, 30 Jan 2019 13:08:35 +0100 Parents: c88e2cce815a6d2d3fa0e7e8f46fe0fc8de6abe3 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e93bbf4d5d2812c698a4711fc0ff751b170bdf2b Log: Remove more leftovers from invalid static calls Callbacks are now always valid or not valid, there is no in-between. Changed paths: M Zend/zend_API.c M Zend/zend_API..h Diff: diff --git a/Zend/zend_API.c b/Zend/zend_API.c index db9afa0..e524227 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -315,17 +315,6 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha } /* }}} */ -ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_deprecated(int num, char *error) /* {{{ */ -{ - const char *space; - const char *class_name = get_active_class_name(&space); - - zend_error(E_DEPRECATED, "%s%s%s() expects parameter %d to be a valid callback, %s", - class_name, space, get_active_function_name(), num, error); - efree(error); -} -/* }}} */ - ZEND_API int ZEND_FASTCALL zend_parse_arg_class(zval *arg, zend_class_entry **pce, int num, int check_null) /* {{{ */ { zend_class_entry *ce_base = *pce; @@ -557,7 +546,7 @@ ZEND_API int ZEND_FASTCALL zend_parse_arg_str_slow(zval *arg, zend_string **dest } /* }}} */ -static const char *zend_parse_arg_impl(int arg_num, zval *arg, va_list *va, const char **spec, char **error, int *severity) /* {{{ */ +static const char *zend_parse_arg_impl(int arg_num, zval *arg, va_list *va, const char **spec, char **error) /* {{{ */ { const char *spec_walk = *spec; char c = *spec_walk++; @@ -773,7 +762,6 @@ static const char *zend_parse_arg_impl(int arg_num, zval *arg, va_list *va, cons } if (is_callable_error) { - *severity = E_ERROR; zend_spprintf(error, 0, "to be a valid callback, %s", is_callable_error); efree(is_callable_error); return ""; @@ -807,9 +795,8 @@ static int zend_parse_arg(int arg_num, zval *arg, va_list *va, const char **spec { const char *expected_type = NULL; char *error = NULL; - int severity = 0; - expected_type = zend_parse_arg_impl(arg_num, arg, va, spec, &error, &severity); + expected_type = zend_parse_arg_impl(arg_num, arg, va, spec, &error); if (expected_type) { if (!(flags & ZEND_PARSE_PARAMS_QUIET) && (*expected_type || error)) { const char *space; @@ -828,9 +815,7 @@ static int zend_parse_arg(int arg_num, zval *arg, va_list *va, const char **spec zend_zval_type_name(arg)); } } - if (severity != E_DEPRECATED) { - return FAILURE; - } + return FAILURE; } return SUCCESS; diff --git a/Zend/zend_API.h b/Zend/zend_API.h index c76a919..7656c2a 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -951,7 +951,6 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_type_exception(int nu ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_error(int num, char *name, zval *arg); ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_exception(int num, char *name, zval *arg); ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_error(int num, char *error); -ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_deprecated(int num, char *error); ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, char *error); #define ZPP_ERROR_OK 0 @@ -1142,14 +1141,11 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha if (!_error) { \ _expected_type = Z_EXPECTED_FUNC; \ _error_code = ZPP_ERROR_WRONG_ARG; \ - break; \ } else { \ _error_code = ZPP_ERROR_WRONG_CALLBACK; \ - break; \ } \ - } else if (UNEXPECTED(_error != NULL)) { \ - zend_wrong_callback_deprecated(_i, _error); \ - } + break; \ + } \ #define Z_PARAM_FUNC_EX(dest_fci, dest_fcc, check_null, separate) \ Z_PARAM_FUNC_EX2(dest_fci, dest_fcc, check_null, separate, separate)

« previous php.cvs (#104404) next »