diff options
author | twosee <twose@qq.com> | 2020-07-22 22:29:30 +0800 |
---|---|---|
committer | twosee <twose@qq.com> | 2020-07-23 00:55:58 +0800 |
commit | a65ec4c2db58632b0d9b76516d0fe6d2b5fb4ba5 (patch) | |
tree | 15fc599d3074d649f96334f1430bb7d7e4ccd85a /Zend/zend_API.h | |
parent | e29ee65ec08010e99057f7923b12ca1a3984d95a (diff) | |
download | php-git-a65ec4c2db58632b0d9b76516d0fe6d2b5fb4ba5.tar.gz |
Change type of max_num_args to uint32_t
Closes GH-5885.
Diffstat (limited to 'Zend/zend_API.h')
-rw-r--r-- | Zend/zend_API.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Zend/zend_API.h b/Zend/zend_API.h index 0eb4bffa39..b9eecd3e26 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -1256,7 +1256,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_argument_value_error(uint32_t arg_num #define ZEND_PARSE_PARAMETERS_START_EX(flags, min_num_args, max_num_args) do { \ const int _flags = (flags); \ uint32_t _min_num_args = (min_num_args); \ - int _max_num_args = (max_num_args); /* TODO uint32_t */ \ + uint32_t _max_num_args = (uint32_t) (max_num_args); \ uint32_t _num_args = EX_NUM_ARGS(); \ uint32_t _i = 0; \ zval *_real_arg, *_arg = NULL; \ @@ -1274,8 +1274,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_argument_value_error(uint32_t arg_num \ do { \ if (UNEXPECTED(_num_args < _min_num_args) || \ - (UNEXPECTED(_num_args > _max_num_args) && \ - EXPECTED(_max_num_args >= 0))) { \ + UNEXPECTED(_num_args > _max_num_args)) { \ if (!(_flags & ZEND_PARSE_PARAMS_QUIET)) { \ zend_wrong_parameters_count_error(_min_num_args, _max_num_args); \ } \ |