@@ -350,9 +350,10 @@ PHP_FUNCTION(apcu_cache_info)
350
350
{
351
351
zend_bool limited = 0 ;
352
352
353
- if (zend_parse_parameters (ZEND_NUM_ARGS (), "|b" , & limited ) == FAILURE ) {
354
- return ;
355
- }
353
+ ZEND_PARSE_PARAMETERS_START (0 ,1 )
354
+ Z_PARAM_OPTIONAL
355
+ Z_PARAM_BOOL (limited )
356
+ ZEND_PARSE_PARAMETERS_END ();
356
357
357
358
if (!apc_cache_info (return_value , apc_user_cache , limited )) {
358
359
php_error_docref (NULL , E_WARNING , "No APC info available. Perhaps APC is not enabled? Check apc.enabled in your ini file" );
@@ -366,9 +367,9 @@ PHP_FUNCTION(apcu_key_info)
366
367
{
367
368
zend_string * key ;
368
369
369
- if ( zend_parse_parameters ( ZEND_NUM_ARGS (), "S" , & key ) == FAILURE ) {
370
- return ;
371
- }
370
+ ZEND_PARSE_PARAMETERS_START ( 1 , 1 )
371
+ Z_PARAM_STR ( key )
372
+ ZEND_PARSE_PARAMETERS_END ();
372
373
373
374
apc_cache_stat (apc_user_cache , key , return_value );
374
375
} /* }}} */
@@ -381,9 +382,10 @@ PHP_FUNCTION(apcu_sma_info)
381
382
int i ;
382
383
zend_bool limited = 0 ;
383
384
384
- if (zend_parse_parameters (ZEND_NUM_ARGS (), "|b" , & limited ) == FAILURE ) {
385
- return ;
386
- }
385
+ ZEND_PARSE_PARAMETERS_START (0 , 1 )
386
+ Z_PARAM_OPTIONAL
387
+ Z_PARAM_BOOL (limited )
388
+ ZEND_PARSE_PARAMETERS_END ();
387
389
388
390
info = apc_sma_info (& apc_sma , limited );
389
391
@@ -447,9 +449,12 @@ static void apc_store_helper(INTERNAL_FUNCTION_PARAMETERS, const zend_bool exclu
447
449
zval * val = NULL ;
448
450
zend_long ttl = 0L ;
449
451
450
- if (zend_parse_parameters (ZEND_NUM_ARGS (), "z|zl" , & key , & val , & ttl ) == FAILURE ) {
451
- return ;
452
- }
452
+ ZEND_PARSE_PARAMETERS_START (1 , 3 )
453
+ Z_PARAM_ZVAL (key )
454
+ Z_PARAM_OPTIONAL
455
+ Z_PARAM_ZVAL (val )
456
+ Z_PARAM_LONG (ttl )
457
+ ZEND_PARSE_PARAMETERS_END ();
453
458
454
459
if (APCG (serializer_name )) {
455
460
/* Avoid race conditions between MINIT of apc and serializer exts like igbinary */
@@ -540,9 +545,13 @@ PHP_FUNCTION(apcu_inc) {
540
545
zend_long step = 1 , ttl = 0 ;
541
546
zval * success = NULL ;
542
547
543
- if (zend_parse_parameters (ZEND_NUM_ARGS (), "S|lzl" , & key , & step , & success , & ttl ) == FAILURE ) {
544
- return ;
545
- }
548
+ ZEND_PARSE_PARAMETERS_START (1 , 4 )
549
+ Z_PARAM_STR (key )
550
+ Z_PARAM_OPTIONAL
551
+ Z_PARAM_LONG (step )
552
+ Z_PARAM_ZVAL (success )
553
+ Z_PARAM_LONG (ttl )
554
+ ZEND_PARSE_PARAMETERS_END ();
546
555
547
556
args .step = step ;
548
557
if (php_apc_update (key , php_inc_updater , & args , 1 , ttl )) {
@@ -568,9 +577,13 @@ PHP_FUNCTION(apcu_dec) {
568
577
zend_long step = 1 , ttl = 0 ;
569
578
zval * success = NULL ;
570
579
571
- if (zend_parse_parameters (ZEND_NUM_ARGS (), "S|lzl" , & key , & step , & success , & ttl ) == FAILURE ) {
572
- return ;
573
- }
580
+ ZEND_PARSE_PARAMETERS_START (1 , 4 )
581
+ Z_PARAM_STR (key )
582
+ Z_PARAM_OPTIONAL
583
+ Z_PARAM_LONG (step )
584
+ Z_PARAM_ZVAL (success )
585
+ Z_PARAM_LONG (ttl )
586
+ ZEND_PARSE_PARAMETERS_END ();
574
587
575
588
args .step = 0 - step ;
576
589
if (php_apc_update (key , php_inc_updater , & args , 1 , ttl )) {
@@ -604,9 +617,11 @@ PHP_FUNCTION(apcu_cas) {
604
617
zend_string * key ;
605
618
zend_long vals [2 ];
606
619
607
- if (zend_parse_parameters (ZEND_NUM_ARGS (), "Sll" , & key , & vals [0 ], & vals [1 ]) == FAILURE ) {
608
- return ;
609
- }
620
+ ZEND_PARSE_PARAMETERS_START (3 , 3 )
621
+ Z_PARAM_STR (key )
622
+ Z_PARAM_LONG (vals [0 ])
623
+ Z_PARAM_LONG (vals [1 ])
624
+ ZEND_PARSE_PARAMETERS_END ();
610
625
611
626
if (APCG (serializer_name )) {
612
627
/* Avoid race conditions between MINIT of apc and serializer exts like igbinary */
@@ -625,9 +640,11 @@ PHP_FUNCTION(apcu_fetch) {
625
640
time_t t ;
626
641
int result ;
627
642
628
- if (zend_parse_parameters (ZEND_NUM_ARGS (), "z|z" , & key , & success ) == FAILURE ) {
629
- return ;
630
- }
643
+ ZEND_PARSE_PARAMETERS_START (1 , 2 )
644
+ Z_PARAM_ZVAL (key )
645
+ Z_PARAM_OPTIONAL
646
+ Z_PARAM_ZVAL (success )
647
+ ZEND_PARSE_PARAMETERS_END ();
631
648
632
649
t = apc_time ();
633
650
@@ -676,9 +693,9 @@ PHP_FUNCTION(apcu_exists) {
676
693
zval * key ;
677
694
time_t t ;
678
695
679
- if ( zend_parse_parameters ( ZEND_NUM_ARGS (), "z" , & key ) == FAILURE ) {
680
- return ;
681
- }
696
+ ZEND_PARSE_PARAMETERS_START ( 1 , 1 )
697
+ Z_PARAM_ZVAL ( key )
698
+ ZEND_PARSE_PARAMETERS_END ();
682
699
683
700
t = apc_time ();
684
701
@@ -718,9 +735,9 @@ PHP_FUNCTION(apcu_exists) {
718
735
PHP_FUNCTION (apcu_delete ) {
719
736
zval * keys ;
720
737
721
- if ( zend_parse_parameters ( ZEND_NUM_ARGS (), "z" , & keys ) == FAILURE ) {
722
- return ;
723
- }
738
+ ZEND_PARSE_PARAMETERS_START ( 1 , 1 )
739
+ Z_PARAM_ZVAL ( keys )
740
+ ZEND_PARSE_PARAMETERS_END ();
724
741
725
742
if (Z_TYPE_P (keys ) == IS_STRING ) {
726
743
RETURN_BOOL (apc_cache_delete (apc_user_cache , Z_STR_P (keys )));
@@ -754,9 +771,12 @@ PHP_FUNCTION(apcu_entry) {
754
771
zend_long ttl = 0L ;
755
772
zend_long now = apc_time ();
756
773
757
- if (zend_parse_parameters (ZEND_NUM_ARGS (), "Sf|l" , & key , & fci , & fcc , & ttl ) != SUCCESS ) {
758
- return ;
759
- }
774
+ ZEND_PARSE_PARAMETERS_START (2 , 3 )
775
+ Z_PARAM_STR (key )
776
+ Z_PARAM_FUNC (fci , fcc )
777
+ Z_PARAM_OPTIONAL
778
+ Z_PARAM_LONG (ttl )
779
+ ZEND_PARSE_PARAMETERS_END ();
760
780
761
781
apc_cache_entry (apc_user_cache , key , & fci , & fcc , ttl , now , return_value );
762
782
}
@@ -767,9 +787,10 @@ PHP_FUNCTION(apcu_entry) {
767
787
PHP_FUNCTION (apcu_inc_request_time ) {
768
788
zend_long by = 1 ;
769
789
770
- if (zend_parse_parameters (ZEND_NUM_ARGS (), "|l" , & by ) != SUCCESS ) {
771
- return ;
772
- }
790
+ ZEND_PARSE_PARAMETERS_START (0 , 1 )
791
+ Z_PARAM_OPTIONAL
792
+ Z_PARAM_LONG (by )
793
+ ZEND_PARSE_PARAMETERS_END ();
773
794
774
795
if (!APCG (use_request_time )) {
775
796
php_error_docref (NULL , E_WARNING ,
0 commit comments