mirror of
https://github.com/php/php-src.git
synced 2025-08-18 06:58:55 +02:00
Fixed iterators API. zend_iterator_init() has to be used in each get_iterator() callback.
This commit is contained in:
parent
a4a86df3c0
commit
495551aa8c
12 changed files with 45 additions and 23 deletions
|
@ -1148,6 +1148,8 @@ zend_object_iterator *spl_array_get_iterator(zend_class_entry *ce, zval *object,
|
|||
|
||||
iterator = emalloc(sizeof(spl_array_it));
|
||||
|
||||
zend_iterator_init((zend_object_iterator*)iterator TSRMLS_CC);
|
||||
|
||||
Z_ADDREF_P(object);
|
||||
iterator->intern.it.data = (void*)object;
|
||||
iterator->intern.it.funcs = &spl_array_it_funcs;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue