diff options
-rw-r--r-- | test/hash_test.c | 8 | ||||
-rw-r--r-- | zix/hash.c | 2 | ||||
-rw-r--r-- | zix/hash.h | 6 |
3 files changed, 8 insertions, 8 deletions
diff --git a/test/hash_test.c b/test/hash_test.c index a24ae9c..b036fc5 100644 --- a/test/hash_test.c +++ b/test/hash_test.c @@ -100,8 +100,8 @@ stress(void) // Insert each string for (size_t i = 0; i < n_strings; ++i) { - const void* inserted = NULL; - ZixStatus st = zix_hash_insert(hash, &strings[i], &inserted); + void* inserted = NULL; + ZixStatus st = zix_hash_insert(hash, &strings[i], &inserted); if (st) { return test_fail("Failed to insert `%s'\n", strings[i]); } else if (*(const void*const*)inserted != strings[i]) { @@ -120,8 +120,8 @@ stress(void) // Attempt to insert each string again for (size_t i = 0; i < n_strings; ++i) { - const void* inserted = NULL; - ZixStatus st = zix_hash_insert(hash, &strings[i], &inserted); + void* inserted = NULL; + ZixStatus st = zix_hash_insert(hash, &strings[i], &inserted); if (st != ZIX_STATUS_EXISTS) { return test_fail("Double inserted `%s'\n", strings[i]); } @@ -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; @@ -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`. |