summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib.c b/lib.c
index 45ec1417..3f2a9616 100644
--- a/lib.c
+++ b/lib.c
@@ -857,6 +857,16 @@ void seq_iter_init_with_info(val self, seq_iter_t *it,
}
}
}
+ if (it->inf.obj->co.cls == tree_iter_s)
+ {
+ it->ui.iter = if3(support_rewind,
+ copy_tree_iter(it->inf.obj),
+ it->inf.obj);
+ it->ul.len = 0;
+ it->get = seq_iter_get_tree;
+ it->peek = seq_iter_peek_tree;
+ break;
+ }
/* fallthrough */
default:
switch (it->inf.kind) {