Skip to content

Commit

Permalink
Change type of max_num_args to uint32_t
Browse files Browse the repository at this point in the history
Closes GH-5885.
  • Loading branch information
twose committed Jul 22, 2020
1 parent e29ee65 commit a65ec4c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Zend/zend_API.h
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand All @@ -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); \
} \
Expand Down

0 comments on commit a65ec4c

Please sign in to comment.