com php-src: Change type of max_num_args to uint32 _t: Zend/zend_API.h
| From: | QiHao ChenCao | Date: | Wed, 22 Jul 2020 16:55:58 +0000 |
| Subject: | com php-src: Change type of max_num_args to uint32 _t: Zend/zend_API.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-112320@lists.php.net to get a copy of this message | ||
Commit: a65ec4c2db58632b0d9b76516d0fe6d2b5fb4ba5
Author: twosee <twose@qq.com> Wed, 22 Jul 2020 22:29:30 +0800
Parents: e29ee65ec08010e99057f7923b12ca1a3984d95a
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a65ec4c2db58632b0d9b76516d0fe6d2b5fb4ba5
Log:
Change type of max_num_args to uint32_t
Closes GH-5885.
Changed paths:
M Zend/zend_API.h
Diff:
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); \
} \