mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +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
|
@ -259,6 +259,8 @@ static zend_object_iterator *zend_user_it_get_iterator(zend_class_entry *ce, zva
|
|||
|
||||
iterator = emalloc(sizeof(zend_user_iterator));
|
||||
|
||||
zend_iterator_init((zend_object_iterator*)iterator TSRMLS_CC);
|
||||
|
||||
Z_ADDREF_P(object);
|
||||
iterator->it.data = (void*)object;
|
||||
iterator->it.funcs = ce->iterator_funcs.funcs;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue