From 403d8dc92750679eb96968f5fc4465e96401ef14 Mon Sep 17 00:00:00 2001 From: Fabrice Date: Sun, 22 Mar 2026 21:31:59 +0100 Subject: adding proper example --- cheesemap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cheesemap.c') diff --git a/cheesemap.c b/cheesemap.c index a65b64e..bf1841f 100644 --- a/cheesemap.c +++ b/cheesemap.c @@ -351,7 +351,7 @@ bool cm_raw_reserve(struct cheesemap_raw* map, cm_hash_fn hash, uint8_t* user, return cm_raw_resize(map, hash, user, entry_size, new_capacity); } -bool cm_raw_lookup(struct cheesemap_raw* map, cm_hash_fn hash, +bool cm_raw_lookup(const struct cheesemap_raw* map, cm_hash_fn hash, cm_compare_fn compare, uint8_t* user, uintptr_t entry_size, uintptr_t value_offset, const uint8_t* key, uint8_t** out_value) { @@ -471,7 +471,8 @@ bool cm_insert(struct cheesemap* map, const uint8_t* key, value); } -bool cm_lookup(struct cheesemap* map, const uint8_t* key, uint8_t** out_value) { +bool cm_lookup(const struct cheesemap* map, const uint8_t* key, + uint8_t** out_value) { assert(map != NULL); assert(key != NULL && out_value != NULL); -- cgit v1.2.3