summaryrefslogtreecommitdiff
path: root/Zend/zend_iterators.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-07-01 11:49:44 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-07-01 15:17:22 +0200
commit312201dce4daca2770fd507af4a9a541bfe83fc0 (patch)
treeda522ea9d98ab2b457d88a8fa11d7f5f18168481 /Zend/zend_iterators.c
parent8d9637bdacd698b72da3e0b9578ebfafefa82f3c (diff)
downloadphp-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.c6
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;