diff options
| author | steven-na <noreply.github@stvnc.dev> | 2026-08-19 12:59:37 -0700 |
|---|---|---|
| committer | steven-na <noreply.github@stvnc.dev> | 2026-08-19 12:59:37 -0700 |
| commit | 80223cd4a18b95f05addce9d6eab29348583becb (patch) | |
| tree | f1f995348d5ceeb0281654971154c0cfcc750e07 /src/map.h | |
| parent | cb95e397b887f9cda577dd89616d815cd8b2bd2a (diff) | |
Started working on hashmap
Diffstat (limited to 'src/map.h')
| -rw-r--r-- | src/map.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/map.h b/src/map.h new file mode 100644 index 0000000..e8183d2 --- /dev/null +++ b/src/map.h @@ -0,0 +1,13 @@ +#pragma once + +#include "common.h" +#include "smrt_arena.h" + +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); |