summaryrefslogtreecommitdiff
path: root/src/map.h
diff options
context:
space:
mode:
authorsteven-na <noreply.github@stvnc.dev>2026-08-20 12:16:24 -0700
committersteven-na <noreply.github@stvnc.dev>2026-08-20 12:16:24 -0700
commit4b73fa11fbbbd43fe5292bdd9dce4abcbb514318 (patch)
tree914bf122d20e2d22045711c822f06714bae5789d /src/map.h
parent80223cd4a18b95f05addce9d6eab29348583becb (diff)
Got hashmap functional atleast
Diffstat (limited to 'src/map.h')
-rw-r--r--src/map.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/map.h b/src/map.h
index e8183d2..b99a306 100644
--- a/src/map.h
+++ b/src/map.h
@@ -3,11 +3,11 @@
#include "common.h"
#include "smrt_arena.h"
+// Hashmap structure that stores u8* keys and void* values.
+// API: map_create, map_insert, map_delete, map_lookoop
typedef struct _map_t* map_t;
map_t map_create(smrt_arena_t *arena, u64 table_size);
- i32 map_insert(map_t map, u8 *key, u64 keylen, void *value);
- i32 map_delete(map_t map, u8 *key, u64 keylen);
- void *map_lookup(map_t map, u8 *key, u64 keylen);
-
-void map_print(map_t map);
+ i32 map_insert(map_t const map, u8 const *key, u64 keylen, void *value);
+ i32 map_delete(map_t const map, u8 const *key, u64 keylen);
+ void *map_lookup(map_t const map, u8 const *key, u64 keylen);