1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Remove generator iterator member

This is probably a leftover from the PHP 5 implementation, where
the iterator was embedded directly in the generator.
This commit is contained in:
Nikita Popov
2020-06-30 18:26:29 +02:00
parent e2a407c2fe
commit 89b2483edd
2 changed files with 1 additions and 6 deletions

View File

@@ -1023,8 +1023,6 @@ ZEND_METHOD(Generator, getReturn)
static void zend_generator_iterator_dtor(zend_object_iterator *iterator) /* {{{ */
{
zend_generator *generator = (zend_generator*)Z_OBJ(iterator->data);
generator->iterator = NULL;
zval_ptr_dtor(&iterator->data);
}
/* }}} */
@@ -1114,8 +1112,7 @@ zend_object_iterator *zend_generator_get_iterator(zend_class_entry *ce, zval *ob
return NULL;
}
iterator = generator->iterator = emalloc(sizeof(zend_object_iterator));
iterator = emalloc(sizeof(zend_object_iterator));
zend_iterator_init(iterator);
iterator->funcs = &zend_generator_iterator_functions;

View File

@@ -55,8 +55,6 @@ struct _zend_generator_node {
struct _zend_generator {
zend_object std;
zend_object_iterator *iterator;
/* The suspended execution context. */
zend_execute_data *execute_data;