Skip to content

Commit e547fe4

Browse files
committed
ext/spl: Remove useless obj field from spl_iterator_apply_info
1 parent 73f52dc commit e547fe4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ext/spl/spl_iterators.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3059,7 +3059,6 @@ PHP_FUNCTION(iterator_count)
30593059
/* }}} */
30603060

30613061
typedef struct {
3062-
zval *obj;
30633062
zend_long count;
30643063
zend_fcall_info fci;
30653064
zend_fcall_info_cache fcc;
@@ -3082,16 +3081,17 @@ static int spl_iterator_func_apply(zend_object_iterator *iter, void *puser) /* {
30823081
/* {{{ Calls a function for every element in an iterator */
30833082
PHP_FUNCTION(iterator_apply)
30843083
{
3084+
zval *traversable;
30853085
spl_iterator_apply_info apply_info;
30863086

30873087
/* The HashTable is used to determine positional arguments */
3088-
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Of|h!", &apply_info.obj, zend_ce_traversable,
3088+
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Of|h!", &traversable, zend_ce_traversable,
30893089
&apply_info.fci, &apply_info.fcc, &apply_info.fci.named_params) == FAILURE) {
30903090
RETURN_THROWS();
30913091
}
30923092

30933093
apply_info.count = 0;
3094-
if (spl_iterator_apply(apply_info.obj, spl_iterator_func_apply, (void*)&apply_info) == FAILURE) {
3094+
if (spl_iterator_apply(traversable, spl_iterator_func_apply, (void*)&apply_info) == FAILURE) {
30953095
return;
30963096
}
30973097
RETURN_LONG(apply_info.count);

0 commit comments

Comments
 (0)