summaryrefslogtreecommitdiff
path: root/ext/spl
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2019-11-01 13:19:52 +0100
committerChristoph M. Becker <cmbecker69@gmx.de>2019-11-01 16:47:15 +0100
commit4008704f62c849d689fe6bfec07ea3f1a9faf903 (patch)
tree24cf0b6fa831eb2fa858fa02ccafc2552a82cb63 /ext/spl
parent2204dbde3bcdd6b6e8490cf74418e9e06dcc7f7a (diff)
downloadphp-git-4008704f62c849d689fe6bfec07ea3f1a9faf903.tar.gz
zend_parse_parameters_throw() is obsolete
Since `zend_parse_parameters()` throws now, there is no reason to explicitly call `zend_parse_parameters_throw()` anymore, and since both have actually the same implementation, we redefine the latter as macro.
Diffstat (limited to 'ext/spl')
-rw-r--r--ext/spl/spl_array.c6
-rw-r--r--ext/spl/spl_directory.c6
-rw-r--r--ext/spl/spl_dllist.c2
-rw-r--r--ext/spl/spl_fixedarray.c2
-rw-r--r--ext/spl/spl_iterators.c12
-rw-r--r--ext/spl/spl_observer.c4
6 files changed, 16 insertions, 16 deletions
diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c
index b9c58caea0..06ed51b579 100644
--- a/ext/spl/spl_array.c
+++ b/ext/spl/spl_array.c
@@ -1197,7 +1197,7 @@ SPL_METHOD(Array, __construct)
return; /* nothing to do */
}
- if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "z|lC", &array, &ar_flags, &ce_get_iterator) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|lC", &array, &ar_flags, &ce_get_iterator) == FAILURE) {
return;
}
@@ -1226,7 +1226,7 @@ SPL_METHOD(ArrayIterator, __construct)
return; /* nothing to do */
}
- if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "z|l", &array, &ar_flags) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|l", &array, &ar_flags) == FAILURE) {
return;
}
@@ -1864,7 +1864,7 @@ SPL_METHOD(Array, __unserialize)
zval *flags_zv, *storage_zv, *members_zv;
zend_long flags;
- if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "h", &data) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "h", &data) == FAILURE) {
return;
}
diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c
index 2d71171859..77e08a3a9c 100644
--- a/ext/spl/spl_directory.c
+++ b/ext/spl/spl_directory.c
@@ -1131,7 +1131,7 @@ SPL_METHOD(SplFileInfo, __construct)
char *path;
size_t len;
- if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "p", &path, &len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &path, &len) == FAILURE) {
return;
}
@@ -2252,7 +2252,7 @@ SPL_METHOD(SplFileObject, __construct)
intern->u.file.open_mode = NULL;
intern->u.file.open_mode_len = 0;
- if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "p|sbr!",
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|sbr!",
&intern->file_name, &intern->file_name_len,
&intern->u.file.open_mode, &intern->u.file.open_mode_len,
&use_include_path, &intern->u.file.zcontext) == FAILURE) {
@@ -2307,7 +2307,7 @@ SPL_METHOD(SplTempFileObject, __construct)
spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS);
zend_error_handling error_handling;
- if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "|l", &max_memory) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &max_memory) == FAILURE) {
return;
}
diff --git a/ext/spl/spl_dllist.c b/ext/spl/spl_dllist.c
index 0f0c543549..baa6cf23ef 100644
--- a/ext/spl/spl_dllist.c
+++ b/ext/spl/spl_dllist.c
@@ -1252,7 +1252,7 @@ SPL_METHOD(SplDoublyLinkedList, __unserialize) {
HashTable *data;
zval *flags_zv, *storage_zv, *members_zv, *elem;
- if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "h", &data) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "h", &data) == FAILURE) {
return;
}
diff --git a/ext/spl/spl_fixedarray.c b/ext/spl/spl_fixedarray.c
index 52d48374df..8c579b6cfb 100644
--- a/ext/spl/spl_fixedarray.c
+++ b/ext/spl/spl_fixedarray.c
@@ -545,7 +545,7 @@ SPL_METHOD(SplFixedArray, __construct)
spl_fixedarray_object *intern;
zend_long size = 0;
- if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "|l", &size) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &size) == FAILURE) {
return;
}
diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c
index f0fd358229..331f007d5d 100644
--- a/ext/spl/spl_iterators.c
+++ b/ext/spl/spl_iterators.c
@@ -1404,7 +1404,7 @@ static spl_dual_it_object* spl_dual_it_construct(INTERNAL_FUNCTION_PARAMETERS, z
case DIT_LimitIterator: {
intern->u.limit.offset = 0; /* start at beginning */
intern->u.limit.count = -1; /* get all */
- if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "O|ll", &zobject, ce_inner, &intern->u.limit.offset, &intern->u.limit.count) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|ll", &zobject, ce_inner, &intern->u.limit.offset, &intern->u.limit.count) == FAILURE) {
return NULL;
}
if (intern->u.limit.offset < 0) {
@@ -1420,7 +1420,7 @@ static spl_dual_it_object* spl_dual_it_construct(INTERNAL_FUNCTION_PARAMETERS, z
case DIT_CachingIterator:
case DIT_RecursiveCachingIterator: {
zend_long flags = CIT_CALL_TOSTRING;
- if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "O|l", &zobject, ce_inner, &flags) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|l", &zobject, ce_inner, &flags) == FAILURE) {
return NULL;
}
if (spl_cit_check_flags(flags) != SUCCESS) {
@@ -1435,7 +1435,7 @@ static spl_dual_it_object* spl_dual_it_construct(INTERNAL_FUNCTION_PARAMETERS, z
zend_class_entry *ce_cast;
zend_string *class_name;
- if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "O|S", &zobject, ce_inner, &class_name) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|S", &zobject, ce_inner, &class_name) == FAILURE) {
return NULL;
}
ce = Z_OBJCE_P(zobject);
@@ -1482,7 +1482,7 @@ static spl_dual_it_object* spl_dual_it_construct(INTERNAL_FUNCTION_PARAMETERS, z
intern->u.regex.use_flags = ZEND_NUM_ARGS() >= 5;
intern->u.regex.flags = 0;
intern->u.regex.preg_flags = 0;
- if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "OS|lll", &zobject, ce_inner, &regex, &mode, &intern->u.regex.flags, &intern->u.regex.preg_flags) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "OS|lll", &zobject, ce_inner, &regex, &mode, &intern->u.regex.flags, &intern->u.regex.preg_flags) == FAILURE) {
return NULL;
}
if (mode < 0 || mode >= REGIT_MODE_MAX) {
@@ -1507,7 +1507,7 @@ static spl_dual_it_object* spl_dual_it_construct(INTERNAL_FUNCTION_PARAMETERS, z
case DIT_RecursiveCallbackFilterIterator: {
_spl_cbfilter_it_intern *cfi = emalloc(sizeof(*cfi));
cfi->fci.object = NULL;
- if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "Of", &zobject, ce_inner, &cfi->fci, &cfi->fcc) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "Of", &zobject, ce_inner, &cfi->fci, &cfi->fcc) == FAILURE) {
efree(cfi);
return NULL;
}
@@ -1518,7 +1518,7 @@ static spl_dual_it_object* spl_dual_it_construct(INTERNAL_FUNCTION_PARAMETERS, z
break;
}
default:
- if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "O", &zobject, ce_inner) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &zobject, ce_inner) == FAILURE) {
return NULL;
}
break;
diff --git a/ext/spl/spl_observer.c b/ext/spl/spl_observer.c
index dfc3e13455..8c9a8b0dd0 100644
--- a/ext/spl/spl_observer.c
+++ b/ext/spl/spl_observer.c
@@ -906,7 +906,7 @@ SPL_METHOD(SplObjectStorage, __unserialize)
HashTable *data;
zval *storage_zv, *members_zv, *key, *val;
- if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "h", &data) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "h", &data) == FAILURE) {
return;
}
@@ -1018,7 +1018,7 @@ SPL_METHOD(MultipleIterator, __construct)
spl_SplObjectStorage *intern;
zend_long flags = MIT_NEED_ALL|MIT_KEYS_NUMERIC;
- if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "|l", &flags) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &flags) == FAILURE) {
return;
}