aboutsummaryrefslogtreecommitdiffstats
path: root/cheesemap.c
diff options
context:
space:
mode:
authorFabrice <fabrice@schaub-dev.xyz>2026-03-22 21:31:59 +0100
committerFabrice <fabrice@schaub-dev.xyz>2026-03-22 21:31:59 +0100
commit403d8dc92750679eb96968f5fc4465e96401ef14 (patch)
treeafae902778194e390e7bb994597f6ccf78199240 /cheesemap.c
parent9b43c34b9b51d953bd4363df576a6f93e9596700 (diff)
adding proper example
Diffstat (limited to 'cheesemap.c')
-rw-r--r--cheesemap.c5
1 files changed, 3 insertions, 2 deletions
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);