summaryrefslogtreecommitdiff
path: root/src/iterator.c
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2015-01-08 10:29:09 -0800
committerJohn MacFarlane <fiddlosopher@gmail.com>2015-01-08 10:29:09 -0800
commit363c25c0a5584c0f936aaa9481b2130e29afa291 (patch)
tree02e3c545e657cedf1e3ddcea5e591ec2875c515b /src/iterator.c
parent8713ff912aaf13926d799d7cbd61e5cf014ddb7e (diff)
Added `cmark_iter_reset` and a note about handling destructive updates.
Diffstat (limited to 'src/iterator.c')
-rw-r--r--src/iterator.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/iterator.c b/src/iterator.c
index b0ac9d2..2c15246 100644
--- a/src/iterator.c
+++ b/src/iterator.c
@@ -48,6 +48,14 @@ int S_is_leaf(cmark_node *node)
}
}
+void
+cmark_iter_reset(cmark_iter *iter, cmark_node *current,
+ cmark_event_type event_type)
+{
+ iter->event_type = event_type;
+ iter->current = current;
+}
+
cmark_node*
cmark_iter_get_node(cmark_iter *iter)
{