diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-07-01 11:49:44 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-07-01 15:17:22 +0200 |
commit | 312201dce4daca2770fd507af4a9a541bfe83fc0 (patch) | |
tree | da522ea9d98ab2b457d88a8fa11d7f5f18168481 /Zend/zend_iterators.c | |
parent | 8d9637bdacd698b72da3e0b9578ebfafefa82f3c (diff) | |
download | php-git-312201dce4daca2770fd507af4a9a541bfe83fc0.tar.gz |
Add get_gc handle for object iterators
Optional handler with the same semantics as the object handler.
Diffstat (limited to 'Zend/zend_iterators.c')
-rw-r--r-- | Zend/zend_iterators.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Zend/zend_iterators.c b/Zend/zend_iterators.c index 9823390a98..aa4391f2ca 100644 --- a/Zend/zend_iterators.c +++ b/Zend/zend_iterators.c @@ -70,7 +70,11 @@ static void iter_wrapper_dtor(zend_object *object) } static HashTable *iter_wrapper_get_gc(zend_object *object, zval **table, int *n) { - /* TODO: We need a get_gc iterator handler */ + zend_object_iterator *iter = (zend_object_iterator*)object; + if (iter->funcs->get_gc) { + return iter->funcs->get_gc(iter, table, n); + } + *table = NULL; *n = 0; return NULL; |