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
|
@ -1052,6 +1052,9 @@ zend_object_iterator *spl_fixedarray_get_iterator(zend_class_entry *ce, zval *ob
|
|||
Z_ADDREF_P(object);
|
||||
|
||||
iterator = emalloc(sizeof(spl_fixedarray_it));
|
||||
|
||||
zend_iterator_init((zend_object_iterator*)iterator TSRMLS_CC);
|
||||
|
||||
iterator->intern.it.data = object;
|
||||
iterator->intern.it.funcs = &spl_fixedarray_it_funcs;
|
||||
iterator->intern.ce = ce;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue