From f928e67b46bca4922532d909bddd116f3d991179 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 14 Nov 2018 01:21:25 +0100 Subject: Make comparator functions take const user data --- zix/btree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'zix/btree.c') diff --git a/zix/btree.c b/zix/btree.c index 78a5a0d..f337f7d 100644 --- a/zix/btree.c +++ b/zix/btree.c @@ -36,7 +36,7 @@ struct ZixBTreeImpl { ZixBTreeNode* root; ZixDestroyFunc destroy; ZixComparator cmp; - void* cmp_data; + const void* cmp_data; size_t size; unsigned height; ///< Number of levels, i.e. root only has height 1 }; @@ -109,7 +109,7 @@ zix_btree_node_new(const bool leaf) ZIX_API ZixBTree* zix_btree_new(const ZixComparator cmp, - void* const cmp_data, + const void* const cmp_data, const ZixDestroyFunc destroy) { ZixBTree* t = (ZixBTree*)malloc(sizeof(ZixBTree)); -- cgit v1.2.1