aboutsummaryrefslogtreecommitdiff
path: root/src/ds/hashmap.c
diff options
context:
space:
mode:
authorMosder <git@mosder.eu>2026-09-14 12:16:31 +0200
committerMosder <git@mosder.eu>2026-09-14 12:16:31 +0200
commitd9ca02ef581c5f58957f83c5cad35ad99b00729f (patch)
tree5ffcc252158e6b7a2f18208b520f996a06acdc25 /src/ds/hashmap.c
parent74c6cbf6d883b88646c96cf46abd5ab87c36d509 (diff)
fix: removed const from where it shouldn't be and added a free fix for a specific concurrent operation on a hashmap - it still is not recommended, but this one is free, so might as well
Diffstat (limited to 'src/ds/hashmap.c')
-rw-r--r--src/ds/hashmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ds/hashmap.c b/src/ds/hashmap.c
index f10b687..e11daf3 100644
--- a/src/ds/hashmap.c
+++ b/src/ds/hashmap.c
@@ -231,7 +231,7 @@ size_t mos_hm_get_fn(void *hm, void *key, size_t entry_size, size_t key_size) {
return i + 1;
}
-void *mos_hm_get_e_fn(const void *hm, const void *key, size_t entry_size, size_t key_size) {
+void *mos_hm_get_e_fn(void *hm, void *key, size_t entry_size, size_t key_size) {
size_t key_off = (char *)key - (char *)hm;
size_t i = probe(hm, key, entry_size, key_size, key_off, 0);
if (!filled(hm, i) || dead(hm, i))