summaryrefslogtreecommitdiffstats
path: root/zix/tree.h
diff options
context:
space:
mode:
Diffstat (limited to 'zix/tree.h')
-rw-r--r--zix/tree.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/zix/tree.h b/zix/tree.h
index cdcec10..378db28 100644
--- a/zix/tree.h
+++ b/zix/tree.h
@@ -18,6 +18,7 @@
#define ZIX_TREE_H
#include <stdbool.h>
+#include <stddef.h>
#include "zix/common.h"
@@ -46,7 +47,10 @@ typedef struct ZixTreeNodeImpl ZixTreeIter;
Create a new (empty) tree.
*/
ZixTree*
-zix_tree_new(bool allow_duplicates, ZixComparator cmp, void* cmp_data);
+zix_tree_new(bool allow_duplicates,
+ ZixComparator cmp,
+ void* cmp_data,
+ ZixDestroyFunc destroy);
/**
Free @a t.
@@ -55,6 +59,12 @@ void
zix_tree_free(ZixTree* t);
/**
+ Return the number of elements in @a t.
+*/
+size_t
+zix_tree_size(ZixTree* t);
+
+/**
Insert the element @a e into @a t and point @a ti at the new element.
*/
ZixStatus