From 731ce39ef6fa35f64c19947bdb1719028478fdb9 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 10 Sep 2021 20:11:47 -0400 Subject: Add custom allocator support --- include/zix/tree.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'include/zix/tree.h') 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 -- cgit v1.2.1