summaryrefslogtreecommitdiffstats
path: root/src/zix/btree.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-09-24 23:47:11 +0000
committerDavid Robillard <d@drobilla.net>2014-09-24 23:47:11 +0000
commitaa7e97885285fc79b2bf35941dd428c7515c13bb (patch)
tree3b7f82ae139dce4205442b43e3b2b16b03435289 /src/zix/btree.h
parent851d093f3942eacec533a64d718b362a83f74e78 (diff)
downloadsord-aa7e97885285fc79b2bf35941dd428c7515c13bb.tar.gz
sord-aa7e97885285fc79b2bf35941dd428c7515c13bb.tar.bz2
sord-aa7e97885285fc79b2bf35941dd428c7515c13bb.zip
Add sord_erase() for erasing statements via an iterator.
git-svn-id: http://svn.drobilla.net/sord/trunk@310 3d64ff67-21c5-427c-a301-fe4f08042e5a
Diffstat (limited to 'src/zix/btree.h')
-rw-r--r--src/zix/btree.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/zix/btree.h b/src/zix/btree.h
index 0cd549a..3acd3a4 100644
--- a/src/zix/btree.h
+++ b/src/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`.