summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/zix/btree.h8
-rw-r--r--include/zix/common.h2
-rw-r--r--include/zix/tree.h3
3 files changed, 9 insertions, 4 deletions
diff --git a/include/zix/btree.h b/include/zix/btree.h
index d19da3c..07de8c3 100644
--- a/include/zix/btree.h
+++ b/include/zix/btree.h
@@ -95,7 +95,9 @@ zix_btree_new(ZixComparator cmp, const void* cmp_data);
*/
ZIX_API
void
-zix_btree_free(ZixBTree* t, ZixDestroyFunc destroy);
+zix_btree_free(ZixBTree* t,
+ ZixDestroyFunc destroy,
+ const void* destroy_user_data);
/**
Clear everything from `t`, leaving it empty.
@@ -105,7 +107,9 @@ zix_btree_free(ZixBTree* t, ZixDestroyFunc destroy);
*/
ZIX_API
void
-zix_btree_clear(ZixBTree* t, ZixDestroyFunc destroy);
+zix_btree_clear(ZixBTree* t,
+ ZixDestroyFunc destroy,
+ const void* destroy_user_data);
/// Return the number of elements in `t`
ZIX_PURE_API
diff --git a/include/zix/common.h b/include/zix/common.h
index 02f00b4..f43fcde 100644
--- a/include/zix/common.h
+++ b/include/zix/common.h
@@ -124,7 +124,7 @@ typedef int (*ZixComparator)(const void* a,
typedef bool (*ZixEqualFunc)(const void* a, const void* b);
/// Function to destroy an element
-typedef void (*ZixDestroyFunc)(void* ptr);
+typedef void (*ZixDestroyFunc)(void* ptr, const void* user_data);
/**
@}
diff --git a/include/zix/tree.h b/include/zix/tree.h
index d7d2cce..e0daa80 100644
--- a/include/zix/tree.h
+++ b/include/zix/tree.h
@@ -45,7 +45,8 @@ ZixTree*
zix_tree_new(bool allow_duplicates,
ZixComparator cmp,
void* cmp_data,
- ZixDestroyFunc destroy);
+ ZixDestroyFunc destroy,
+ const void* destroy_user_data);
/// Free `t`
ZIX_API