From 50ceaeb601c46635bdaf65ef70b663290f133179 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 28 Sep 2014 17:23:44 +0000 Subject: Enable BTree removal via iterator. git-svn-id: http://svn.drobilla.net/zix/trunk@91 df6676b4-ccc9-40e5-b5d6-7c4628a128e3 --- zix/btree.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'zix/btree.h') diff --git a/zix/btree.h b/zix/btree.h index 0cd549a..3acd3a4 100644 --- a/zix/btree.h +++ b/zix/btree.h @@ -78,10 +78,16 @@ ZIX_API ZixStatus zix_btree_insert(ZixBTree* t, void* e); /** - Remove the value `e` from `t`, set `removed` to the removed pointer. + Remove the value `e` from `t`. + + @param out Set to point to the removed pointer (which may not equal `e`). + + @param next If non-NULL, pointed to the value following `e`. If *next is + also non-NULL, the iterator is reused, otherwise a new one is allocated. To + reuse an iterator, no items may have been added since its creation. */ ZIX_API ZixStatus -zix_btree_remove(ZixBTree* t, const void* e, void** removed); +zix_btree_remove(ZixBTree* t, const void* e, void** out, ZixBTreeIter** next); /** Set `ti` to an element equal to `e` in `t`. -- cgit v1.2.1