summaryrefslogtreecommitdiff
path: root/src/include/skalibs/avlnode.h
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2015-01-09 16:10:40 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2015-01-09 16:10:40 +0000
commitb59ce39f9779cf4b1ad423783b6a532f94a8e880 (patch)
tree4db0c2cc5de6b4fe5d01fb5cc762b6a74ce32d34 /src/include/skalibs/avlnode.h
parent157ecd01d6cc4598ce4b0ec9bd477abbbf41d6c5 (diff)
downloadskalibs-b59ce39f9779cf4b1ad423783b6a532f94a8e880.tar.xz
Add cancellation to iterators over avltree(n) and genset(dyn)
Diffstat (limited to 'src/include/skalibs/avlnode.h')
-rw-r--r--src/include/skalibs/avlnode.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/include/skalibs/avlnode.h b/src/include/skalibs/avlnode.h
index faaee10..245eef4 100644
--- a/src/include/skalibs/avlnode.h
+++ b/src/include/skalibs/avlnode.h
@@ -39,6 +39,8 @@ extern unsigned int avlnode_insertnode (avlnode *, unsigned int, unsigned int, u
extern unsigned int avlnode_delete (avlnode *, unsigned int, unsigned int *, void const *, dtokfunc_t_ref, cmpfunc_t_ref, void *) ;
#define avlnode_deletenode(s, max, r, i, dtok, f, p) avlnode_delete(s, max, r, (*(dtok))((s)[i].data), dtok, f, p)
-extern int avlnode_iter (avlnode *, unsigned int, unsigned int, avliterfunc_t_ref, void *) ;
+extern unsigned int avlnode_iter_nocancel (avlnode *, unsigned int, unsigned int, unsigned int, avliterfunc_t_ref, void *) ;
+#define avlnode_iter(tree, max, root, f, stuff) (avlnode_iter_nocancel(tree, max, max, root, f, stuff) == (max))
+extern int avlnode_iter_withcancel (avlnode *, unsigned int, unsigned int, avliterfunc_t_ref, avliterfunc_t_ref, void *) ;
#endif