summaryrefslogtreecommitdiffstats
path: root/zix/btree.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-09-28 17:23:44 +0000
committerDavid Robillard <d@drobilla.net>2014-09-28 17:23:44 +0000
commit50ceaeb601c46635bdaf65ef70b663290f133179 (patch)
tree8edbf4a1673b47a127056eacdd606bcaad89169f /zix/btree.h
parentae1afa56e2e26482d0128ca43bd3b3b432c40daf (diff)
downloadzix-50ceaeb601c46635bdaf65ef70b663290f133179.tar.gz
zix-50ceaeb601c46635bdaf65ef70b663290f133179.tar.bz2
zix-50ceaeb601c46635bdaf65ef70b663290f133179.zip
Enable BTree removal via iterator.
git-svn-id: http://svn.drobilla.net/zix/trunk@91 df6676b4-ccc9-40e5-b5d6-7c4628a128e3
Diffstat (limited to 'zix/btree.h')
-rw-r--r--zix/btree.h10
1 files changed, 8 insertions, 2 deletions
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`.