summaryrefslogtreecommitdiffstats
path: root/include/zix/tree.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-09-10 20:11:47 -0400
committerDavid Robillard <d@drobilla.net>2021-09-10 20:54:28 -0400
commit731ce39ef6fa35f64c19947bdb1719028478fdb9 (patch)
tree87304c55061fc9cd0ab1c3007a78eff44de137dc /include/zix/tree.h
parent904c1b4d699aeb1ce170f0cd996a01d2d06812e3 (diff)
downloadzix-731ce39ef6fa35f64c19947bdb1719028478fdb9.tar.gz
zix-731ce39ef6fa35f64c19947bdb1719028478fdb9.tar.bz2
zix-731ce39ef6fa35f64c19947bdb1719028478fdb9.zip
Add custom allocator support
Diffstat (limited to 'include/zix/tree.h')
-rw-r--r--include/zix/tree.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/include/zix/tree.h b/include/zix/tree.h
index 2ce7490..c3b9262 100644
--- a/include/zix/tree.h
+++ b/include/zix/tree.h
@@ -17,6 +17,7 @@
#ifndef ZIX_TREE_H
#define ZIX_TREE_H
+#include "zix/allocator.h"
#include "zix/attributes.h"
#include "zix/common.h"
@@ -43,11 +44,12 @@ typedef struct ZixTreeNodeImpl ZixTreeIter;
/// Create a new (empty) tree
ZIX_API
ZixTree* ZIX_ALLOCATED
-zix_tree_new(bool allow_duplicates,
- ZixComparator ZIX_NONNULL cmp,
- void* ZIX_NULLABLE cmp_data,
- ZixDestroyFunc ZIX_NULLABLE destroy,
- const void* ZIX_NULLABLE destroy_user_data);
+zix_tree_new(const ZixAllocator* ZIX_NULLABLE allocator,
+ bool allow_duplicates,
+ ZixComparator ZIX_NONNULL cmp,
+ void* ZIX_NULLABLE cmp_data,
+ ZixDestroyFunc ZIX_NULLABLE destroy,
+ const void* ZIX_NULLABLE destroy_user_data);
/// Free `t`
ZIX_API