From 8489a1a91e254f8bc987c2a5b65791dee1120c5c Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 7 Jan 2019 20:00:56 +0100 Subject: Make zix_hash_insert() provide a non-const pointer --- zix/hash.c | 2 +- zix/hash.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'zix') diff --git a/zix/hash.c b/zix/hash.c index 2577567..e8acfea 100644 --- a/zix/hash.c +++ b/zix/hash.c @@ -150,7 +150,7 @@ zix_hash_find(const ZixHash* hash, const void* value) } ZIX_API ZixStatus -zix_hash_insert(ZixHash* hash, const void* value, const void** inserted) +zix_hash_insert(ZixHash* hash, const void* value, void** inserted) { unsigned h_nomod = hash->hash_func(value); unsigned h = h_nomod % *hash->n_buckets; diff --git a/zix/hash.h b/zix/hash.h index 58e0e23..9546a64 100644 --- a/zix/hash.h +++ b/zix/hash.h @@ -91,9 +91,9 @@ zix_hash_size(const ZixHash* hash); @return ZIX_STATUS_SUCCESS, ZIX_STATUS_EXISTS, or ZIX_STATUS_NO_MEM. */ ZIX_API ZixStatus -zix_hash_insert(ZixHash* hash, - const void* value, - const void** inserted); +zix_hash_insert(ZixHash* hash, + const void* value, + void** inserted); /** Remove an item from `hash`. -- cgit v1.2.1