@@ -125,9 +125,9 @@ IC_METHOD(getIntPropertyValue) {
125
125
IC_METHOD (getIntPropertyMinValue ) {
126
126
zend_long prop ;
127
127
128
- if ( zend_parse_parameters ( ZEND_NUM_ARGS (), "l" , & prop ) == FAILURE ) {
129
- RETURN_THROWS ();
130
- }
128
+ ZEND_PARSE_PARAMETERS_START ( 1 , 1 )
129
+ Z_PARAM_LONG ( prop )
130
+ ZEND_PARSE_PARAMETERS_END ();
131
131
132
132
RETURN_LONG (u_getIntPropertyMinValue ((UProperty )prop ));
133
133
}
@@ -137,9 +137,9 @@ IC_METHOD(getIntPropertyMinValue) {
137
137
IC_METHOD (getIntPropertyMaxValue ) {
138
138
zend_long prop ;
139
139
140
- if ( zend_parse_parameters ( ZEND_NUM_ARGS (), "l" , & prop ) == FAILURE ) {
141
- RETURN_THROWS ();
142
- }
140
+ ZEND_PARSE_PARAMETERS_START ( 1 , 1 )
141
+ Z_PARAM_LONG ( prop )
142
+ ZEND_PARSE_PARAMETERS_END ();
143
143
144
144
RETURN_LONG (u_getIntPropertyMaxValue ((UProperty )prop ));
145
145
}
@@ -191,9 +191,9 @@ static UBool enumCharType_callback(enumCharType_data *context,
191
191
IC_METHOD (enumCharTypes ) {
192
192
enumCharType_data context ;
193
193
194
- if ( zend_parse_parameters ( ZEND_NUM_ARGS (), "f" , & context . fci , & context . fci_cache ) == FAILURE ) {
195
- RETURN_THROWS ();
196
- }
194
+ ZEND_PARSE_PARAMETERS_START ( 1 , 1 )
195
+ Z_PARAM_FUNC ( context . fci , context . fci_cache )
196
+ ZEND_PARSE_PARAMETERS_END ();
197
197
u_enumCharTypes ((UCharEnumTypeRange * )enumCharType_callback , & context );
198
198
}
199
199
/* }}} */
@@ -250,9 +250,11 @@ IC_METHOD(charFromName) {
250
250
UChar32 ret ;
251
251
UErrorCode error = U_ZERO_ERROR ;
252
252
253
- if (zend_parse_parameters (ZEND_NUM_ARGS (), "s|l" , & name , & name_len , & nameChoice ) == FAILURE ) {
254
- RETURN_THROWS ();
255
- }
253
+ ZEND_PARSE_PARAMETERS_START (1 , 2 )
254
+ Z_PARAM_STRING (name , name_len )
255
+ Z_PARAM_OPTIONAL
256
+ Z_PARAM_LONG (nameChoice )
257
+ ZEND_PARSE_PARAMETERS_END ();
256
258
257
259
ret = u_charFromName ((UCharNameChoice )nameChoice , name , & error );
258
260
INTL_CHECK_STATUS_OR_NULL (error , NULL );
@@ -324,9 +326,11 @@ IC_METHOD(getPropertyName) {
324
326
zend_long nameChoice = U_LONG_PROPERTY_NAME ;
325
327
const char * ret ;
326
328
327
- if (zend_parse_parameters (ZEND_NUM_ARGS (), "l|l" , & property , & nameChoice ) == FAILURE ) {
328
- RETURN_THROWS ();
329
- }
329
+ ZEND_PARSE_PARAMETERS_START (1 , 2 )
330
+ Z_PARAM_LONG (property )
331
+ Z_PARAM_OPTIONAL
332
+ Z_PARAM_LONG (nameChoice )
333
+ ZEND_PARSE_PARAMETERS_END ();
330
334
331
335
ret = u_getPropertyName ((UProperty )property , (UPropertyNameChoice )nameChoice );
332
336
if (ret ) {
@@ -344,9 +348,9 @@ IC_METHOD(getPropertyEnum) {
344
348
char * alias ;
345
349
size_t alias_len ;
346
350
347
- if ( zend_parse_parameters ( ZEND_NUM_ARGS (), "s" , & alias , & alias_len ) == FAILURE ) {
348
- RETURN_THROWS ();
349
- }
351
+ ZEND_PARSE_PARAMETERS_START ( 1 , 1 )
352
+ Z_PARAM_STRING ( alias , alias_len )
353
+ ZEND_PARSE_PARAMETERS_END ();
350
354
351
355
RETURN_LONG (u_getPropertyEnum (alias ));
352
356
}
@@ -357,9 +361,12 @@ IC_METHOD(getPropertyValueName) {
357
361
zend_long property , value , nameChoice = U_LONG_PROPERTY_NAME ;
358
362
const char * ret ;
359
363
360
- if (zend_parse_parameters (ZEND_NUM_ARGS (), "ll|l" , & property , & value , & nameChoice ) == FAILURE ) {
361
- RETURN_THROWS ();
362
- }
364
+ ZEND_PARSE_PARAMETERS_START (2 , 3 )
365
+ Z_PARAM_LONG (property )
366
+ Z_PARAM_LONG (value )
367
+ Z_PARAM_OPTIONAL
368
+ Z_PARAM_LONG (nameChoice )
369
+ ZEND_PARSE_PARAMETERS_END ();
363
370
364
371
ret = u_getPropertyValueName ((UProperty )property , value , (UPropertyNameChoice )nameChoice );
365
372
if (ret ) {
@@ -378,9 +385,10 @@ IC_METHOD(getPropertyValueEnum) {
378
385
char * name ;
379
386
size_t name_len ;
380
387
381
- if (zend_parse_parameters (ZEND_NUM_ARGS (), "ls" , & property , & name , & name_len ) == FAILURE ) {
382
- RETURN_THROWS ();
383
- }
388
+ ZEND_PARSE_PARAMETERS_START (2 , 2 )
389
+ Z_PARAM_LONG (property )
390
+ Z_PARAM_STRING (name , name_len )
391
+ ZEND_PARSE_PARAMETERS_END ();
384
392
385
393
RETURN_LONG (u_getPropertyValueEnum ((UProperty )property , name ));
386
394
}
@@ -447,9 +455,11 @@ IC_METHOD(digit) {
447
455
IC_METHOD (forDigit ) {
448
456
zend_long digit , radix = 10 ;
449
457
450
- if (zend_parse_parameters (ZEND_NUM_ARGS (), "l|l" , & digit , & radix ) == FAILURE ) {
451
- RETURN_THROWS ();
452
- }
458
+ ZEND_PARSE_PARAMETERS_START (1 , 2 )
459
+ Z_PARAM_LONG (digit )
460
+ Z_PARAM_OPTIONAL
461
+ Z_PARAM_LONG (radix )
462
+ ZEND_PARSE_PARAMETERS_END ();
453
463
454
464
RETURN_LONG (u_forDigit (digit , radix ));
455
465
}
@@ -478,9 +488,7 @@ IC_METHOD(getUnicodeVersion) {
478
488
UVersionInfo version ;
479
489
int i ;
480
490
481
- if (zend_parse_parameters_none () == FAILURE ) {
482
- RETURN_THROWS ();
483
- }
491
+ ZEND_PARSE_PARAMETERS_NONE ();
484
492
485
493
u_getUnicodeVersion (version );
486
494
array_init (return_value );
0 commit comments