Skip to content

#60760 Converting zend_parse_parameters() to zend_parse_parameters_none() in the SPL #489

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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