Skip to content

Commit 7f3b5b7

Browse files
committed
Standardized usage of zpp_none and the order of the comparison zpp(...) == FAILURE
1 parent 5ae8c51 commit 7f3b5b7

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed

ext/spl/spl_dllist.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ SPL_METHOD(SplDoublyLinkedList, pop)
603603
zval *value;
604604
spl_dllist_object *intern;
605605

606-
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
606+
if (zend_parse_parameters_none() == FAILURE) {
607607
return;
608608
}
609609

@@ -626,7 +626,7 @@ SPL_METHOD(SplDoublyLinkedList, shift)
626626
zval *value;
627627
spl_dllist_object *intern;
628628

629-
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
629+
if (zend_parse_parameters_none() == FAILURE) {
630630
return;
631631
}
632632

@@ -649,7 +649,7 @@ SPL_METHOD(SplDoublyLinkedList, top)
649649
zval *value;
650650
spl_dllist_object *intern;
651651

652-
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
652+
if (zend_parse_parameters_none() == FAILURE) {
653653
return;
654654
}
655655

@@ -672,7 +672,7 @@ SPL_METHOD(SplDoublyLinkedList, bottom)
672672
zval *value;
673673
spl_dllist_object *intern;
674674

675-
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
675+
if (zend_parse_parameters_none() == FAILURE) {
676676
return;
677677
}
678678

@@ -695,7 +695,7 @@ SPL_METHOD(SplDoublyLinkedList, count)
695695
long count;
696696
spl_dllist_object *intern = (spl_dllist_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
697697

698-
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
698+
if (zend_parse_parameters_none() == FAILURE) {
699699
return;
700700
}
701701

@@ -710,7 +710,7 @@ SPL_METHOD(SplDoublyLinkedList, isEmpty)
710710
{
711711
long count;
712712

713-
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
713+
if (zend_parse_parameters_none() == FAILURE) {
714714
return;
715715
}
716716

@@ -750,7 +750,7 @@ SPL_METHOD(SplDoublyLinkedList, getIteratorMode)
750750
{
751751
spl_dllist_object *intern;
752752

753-
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
753+
if (zend_parse_parameters_none() == FAILURE) {
754754
return;
755755
}
756756

ext/spl/spl_fixedarray.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ SPL_METHOD(SplFixedArray, __construct)
583583
spl_fixedarray_object *intern;
584584
long size = 0;
585585

586-
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &size)) {
586+
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &size) == FAILURE) {
587587
return;
588588
}
589589

@@ -613,7 +613,7 @@ SPL_METHOD(SplFixedArray, __wakeup)
613613
HashTable *intern_ht = zend_std_get_properties(getThis() TSRMLS_CC);
614614
zval **data;
615615

616-
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "")) {
616+
if (zend_parse_parameters_none() == FAILURE) {
617617
return;
618618
}
619619

@@ -643,7 +643,7 @@ SPL_METHOD(SplFixedArray, count)
643643
zval *object = getThis();
644644
spl_fixedarray_object *intern;
645645

646-
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "")) {
646+
if (zend_parse_parameters_none() == FAILURE) {
647647
return;
648648
}
649649

@@ -661,7 +661,7 @@ SPL_METHOD(SplFixedArray, toArray)
661661
{
662662
spl_fixedarray_object *intern;
663663

664-
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "")) {
664+
if (zend_parse_parameters_none() == FAILURE) {
665665
return;
666666
}
667667

@@ -693,7 +693,7 @@ SPL_METHOD(SplFixedArray, fromArray)
693693
int num;
694694
zend_bool save_indexes = 1;
695695

696-
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a|b", &data, &save_indexes)) {
696+
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a|b", &data, &save_indexes) == FAILURE) {
697697
return;
698698
}
699699

@@ -777,7 +777,7 @@ SPL_METHOD(SplFixedArray, getSize)
777777
zval *object = getThis();
778778
spl_fixedarray_object *intern;
779779

780-
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "")) {
780+
if (zend_parse_parameters_none() == FAILURE) {
781781
return;
782782
}
783783

@@ -797,7 +797,7 @@ SPL_METHOD(SplFixedArray, setSize)
797797
spl_fixedarray_object *intern;
798798
long size;
799799

800-
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &size)) {
800+
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &size) == FAILURE) {
801801
return;
802802
}
803803

ext/spl/spl_heap.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ SPL_METHOD(SplHeap, count)
587587
long count;
588588
spl_heap_object *intern = (spl_heap_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
589589

590-
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
590+
if (zend_parse_parameters_none() == FAILURE) {
591591
return;
592592
}
593593

@@ -602,7 +602,7 @@ SPL_METHOD(SplHeap, isEmpty)
602602
{
603603
spl_heap_object *intern = (spl_heap_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
604604

605-
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
605+
if (zend_parse_parameters_none() == FAILURE) {
606606
return;
607607
}
608608

@@ -643,7 +643,7 @@ SPL_METHOD(SplHeap, extract)
643643
zval *value;
644644
spl_heap_object *intern;
645645

646-
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
646+
if (zend_parse_parameters_none() == FAILURE) {
647647
return;
648648
}
649649

@@ -705,7 +705,7 @@ SPL_METHOD(SplPriorityQueue, extract)
705705
zval *value, *value_out, **value_out_pp;
706706
spl_heap_object *intern;
707707

708-
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
708+
if (zend_parse_parameters_none() == FAILURE) {
709709
return;
710710
}
711711

@@ -748,7 +748,7 @@ SPL_METHOD(SplPriorityQueue, top)
748748
zval *value, **value_out;
749749
spl_heap_object *intern;
750750

751-
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
751+
if (zend_parse_parameters_none() == FAILURE) {
752752
return;
753753
}
754754

@@ -802,7 +802,7 @@ SPL_METHOD(SplHeap, recoverFromCorruption)
802802
{
803803
spl_heap_object *intern;
804804

805-
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
805+
if (zend_parse_parameters_none() == FAILURE) {
806806
return;
807807
}
808808

@@ -835,7 +835,7 @@ SPL_METHOD(SplHeap, top)
835835
zval *value;
836836
spl_heap_object *intern;
837837

838-
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
838+
if (zend_parse_parameters_none() == FAILURE) {
839839
return;
840840
}
841841

0 commit comments

Comments
 (0)