Skip to content

Commit

Permalink
Standardized usage of zpp_none and the order of the comparison zpp(..…
Browse files Browse the repository at this point in the history
….) == FAILURE
  • Loading branch information
morrisonlevi committed Oct 11, 2013
1 parent 5ae8c51 commit 7f3b5b7
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
14 changes: 7 additions & 7 deletions ext/spl/spl_dllist.c
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ SPL_METHOD(SplDoublyLinkedList, pop)
zval *value;
spl_dllist_object *intern;

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
if (zend_parse_parameters_none() == FAILURE) {
return;
}

Expand All @@ -626,7 +626,7 @@ SPL_METHOD(SplDoublyLinkedList, shift)
zval *value;
spl_dllist_object *intern;

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
if (zend_parse_parameters_none() == FAILURE) {
return;
}

Expand All @@ -649,7 +649,7 @@ SPL_METHOD(SplDoublyLinkedList, top)
zval *value;
spl_dllist_object *intern;

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
if (zend_parse_parameters_none() == FAILURE) {
return;
}

Expand All @@ -672,7 +672,7 @@ SPL_METHOD(SplDoublyLinkedList, bottom)
zval *value;
spl_dllist_object *intern;

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
if (zend_parse_parameters_none() == FAILURE) {
return;
}

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

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
if (zend_parse_parameters_none() == FAILURE) {
return;
}

Expand All @@ -710,7 +710,7 @@ SPL_METHOD(SplDoublyLinkedList, isEmpty)
{
long count;

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
if (zend_parse_parameters_none() == FAILURE) {
return;
}

Expand Down Expand Up @@ -750,7 +750,7 @@ SPL_METHOD(SplDoublyLinkedList, getIteratorMode)
{
spl_dllist_object *intern;

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
if (zend_parse_parameters_none() == FAILURE) {
return;
}

Expand Down
14 changes: 7 additions & 7 deletions ext/spl/spl_fixedarray.c
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ SPL_METHOD(SplFixedArray, __construct)
spl_fixedarray_object *intern;
long size = 0;

if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &size)) {
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &size) == FAILURE) {
return;
}

Expand Down Expand Up @@ -613,7 +613,7 @@ SPL_METHOD(SplFixedArray, __wakeup)
HashTable *intern_ht = zend_std_get_properties(getThis() TSRMLS_CC);
zval **data;

if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "")) {
if (zend_parse_parameters_none() == FAILURE) {
return;
}

Expand Down Expand Up @@ -643,7 +643,7 @@ SPL_METHOD(SplFixedArray, count)
zval *object = getThis();
spl_fixedarray_object *intern;

if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "")) {
if (zend_parse_parameters_none() == FAILURE) {
return;
}

Expand All @@ -661,7 +661,7 @@ SPL_METHOD(SplFixedArray, toArray)
{
spl_fixedarray_object *intern;

if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "")) {
if (zend_parse_parameters_none() == FAILURE) {
return;
}

Expand Down Expand Up @@ -693,7 +693,7 @@ SPL_METHOD(SplFixedArray, fromArray)
int num;
zend_bool save_indexes = 1;

if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a|b", &data, &save_indexes)) {
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a|b", &data, &save_indexes) == FAILURE) {
return;
}

Expand Down Expand Up @@ -777,7 +777,7 @@ SPL_METHOD(SplFixedArray, getSize)
zval *object = getThis();
spl_fixedarray_object *intern;

if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "")) {
if (zend_parse_parameters_none() == FAILURE) {
return;
}

Expand All @@ -797,7 +797,7 @@ SPL_METHOD(SplFixedArray, setSize)
spl_fixedarray_object *intern;
long size;

if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &size)) {
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &size) == FAILURE) {
return;
}

Expand Down
14 changes: 7 additions & 7 deletions ext/spl/spl_heap.c
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ SPL_METHOD(SplHeap, count)
long count;
spl_heap_object *intern = (spl_heap_object*)zend_object_store_get_object(getThis() TSRMLS_CC);

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
if (zend_parse_parameters_none() == FAILURE) {
return;
}

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

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
if (zend_parse_parameters_none() == FAILURE) {
return;
}

Expand Down Expand Up @@ -643,7 +643,7 @@ SPL_METHOD(SplHeap, extract)
zval *value;
spl_heap_object *intern;

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
if (zend_parse_parameters_none() == FAILURE) {
return;
}

Expand Down Expand Up @@ -705,7 +705,7 @@ SPL_METHOD(SplPriorityQueue, extract)
zval *value, *value_out, **value_out_pp;
spl_heap_object *intern;

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
if (zend_parse_parameters_none() == FAILURE) {
return;
}

Expand Down Expand Up @@ -748,7 +748,7 @@ SPL_METHOD(SplPriorityQueue, top)
zval *value, **value_out;
spl_heap_object *intern;

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
if (zend_parse_parameters_none() == FAILURE) {
return;
}

Expand Down Expand Up @@ -802,7 +802,7 @@ SPL_METHOD(SplHeap, recoverFromCorruption)
{
spl_heap_object *intern;

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
if (zend_parse_parameters_none() == FAILURE) {
return;
}

Expand Down Expand Up @@ -835,7 +835,7 @@ SPL_METHOD(SplHeap, top)
zval *value;
spl_heap_object *intern;

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
if (zend_parse_parameters_none() == FAILURE) {
return;
}

Expand Down

0 comments on commit 7f3b5b7

Please sign in to comment.