summaryrefslogtreecommitdiffstats
path: root/zix/btree.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-11-14 01:21:25 +0100
committerDavid Robillard <d@drobilla.net>2018-11-14 12:10:06 +0100
commitf928e67b46bca4922532d909bddd116f3d991179 (patch)
tree37ded66bd0f3d5bdab9591f0beee5e4131bf07ec /zix/btree.c
parentaefc020257e5cf89ecec036a33ef1637297cecf7 (diff)
downloadzix-f928e67b46bca4922532d909bddd116f3d991179.tar.gz
zix-f928e67b46bca4922532d909bddd116f3d991179.tar.bz2
zix-f928e67b46bca4922532d909bddd116f3d991179.zip
Make comparator functions take const user data
Diffstat (limited to 'zix/btree.c')
-rw-r--r--zix/btree.c4
1 files changed, 2 insertions, 2 deletions
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));