@@ -1580,9 +1580,25 @@ typedef enum _zend_expected_type {
15801580 Z_EXPECTED_LAST
15811581} zend_expected_type ;
15821582
1583+ C23_ENUM (zpp_error , uint8_t ) {
1584+ ZPP_ERROR_OK = 0 ,
1585+ ZPP_ERROR_FAILURE = 1 ,
1586+ ZPP_ERROR_WRONG_CALLBACK = 2 ,
1587+ ZPP_ERROR_WRONG_CLASS = 3 ,
1588+ ZPP_ERROR_WRONG_CLASS_OR_NULL = 4 ,
1589+ ZPP_ERROR_WRONG_CLASS_OR_STRING = 5 ,
1590+ ZPP_ERROR_WRONG_CLASS_OR_STRING_OR_NULL = 6 ,
1591+ ZPP_ERROR_WRONG_CLASS_OR_LONG = 7 ,
1592+ ZPP_ERROR_WRONG_CLASS_OR_LONG_OR_NULL = 8 ,
1593+ ZPP_ERROR_WRONG_ARG = 9 ,
1594+ ZPP_ERROR_WRONG_COUNT = 10 ,
1595+ ZPP_ERROR_UNEXPECTED_EXTRA_NAMED = 11 ,
1596+ ZPP_ERROR_WRONG_CALLBACK_OR_NULL = 12
1597+ };
1598+
15831599ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameters_none_error (void );
15841600ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameters_count_error (uint32_t min_num_args , uint32_t max_num_args );
1585- ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_error (int error_code , uint32_t num , char * name , zend_expected_type expected_type , const zval * arg );
1601+ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_error (zpp_error error_code , uint32_t num , char * name , zend_expected_type expected_type , const zval * arg );
15861602ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_type_error (uint32_t num , zend_expected_type expected_type , const zval * arg );
15871603ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_error (uint32_t num , const char * name , const zval * arg );
15881604ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_or_null_error (uint32_t num , const char * name , const zval * arg );
@@ -1604,20 +1620,6 @@ ZEND_API ZEND_COLD void zend_argument_must_not_be_empty_error(uint32_t arg_num);
16041620ZEND_API ZEND_COLD void zend_class_redeclaration_error (int type , const zend_class_entry * old_ce );
16051621ZEND_API ZEND_COLD void zend_class_redeclaration_error_ex (int type , zend_string * new_name , const zend_class_entry * old_ce );
16061622
1607- #define ZPP_ERROR_OK 0
1608- #define ZPP_ERROR_FAILURE 1
1609- #define ZPP_ERROR_WRONG_CALLBACK 2
1610- #define ZPP_ERROR_WRONG_CLASS 3
1611- #define ZPP_ERROR_WRONG_CLASS_OR_NULL 4
1612- #define ZPP_ERROR_WRONG_CLASS_OR_STRING 5
1613- #define ZPP_ERROR_WRONG_CLASS_OR_STRING_OR_NULL 6
1614- #define ZPP_ERROR_WRONG_CLASS_OR_LONG 7
1615- #define ZPP_ERROR_WRONG_CLASS_OR_LONG_OR_NULL 8
1616- #define ZPP_ERROR_WRONG_ARG 9
1617- #define ZPP_ERROR_WRONG_COUNT 10
1618- #define ZPP_ERROR_UNEXPECTED_EXTRA_NAMED 11
1619- #define ZPP_ERROR_WRONG_CALLBACK_OR_NULL 12
1620-
16211623#define ZEND_PARSE_PARAMETERS_START_EX (flags , min_num_args , max_num_args ) do { \
16221624 const int _flags = (flags); \
16231625 uint32_t _min_num_args = (min_num_args); \
@@ -1629,7 +1631,7 @@ ZEND_API ZEND_COLD void zend_class_redeclaration_error_ex(int type, zend_string
16291631 char *_error = NULL; \
16301632 bool _dummy = 0; \
16311633 bool _optional = 0; \
1632- int _error_code = ZPP_ERROR_OK; \
1634+ zpp_error _error_code = ZPP_ERROR_OK; \
16331635 ((void)_i); \
16341636 ((void)_real_arg); \
16351637 ((void)_arg); \
0 commit comments