diff options
author | Freya Murphy <freya@freyacat.org> | 2023-12-16 11:47:59 -0500 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2023-12-16 11:47:59 -0500 |
commit | 85ba301f52b1c7e1ad928803b14b6c70776f2235 (patch) | |
tree | 28902147b9bf6c393497e21b0cb21c8b957aa3e2 /src/map.h | |
parent | fix hang on incomplete json ident (diff) | |
download | nbtvis-85ba301f52b1c7e1ad928803b14b6c70776f2235.tar.gz nbtvis-85ba301f52b1c7e1ad928803b14b6c70776f2235.tar.bz2 nbtvis-85ba301f52b1c7e1ad928803b14b6c70776f2235.zip |
use hashmap for compound tag
Diffstat (limited to 'src/map.h')
-rw-r--r-- | src/map.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/map.h b/src/map.h new file mode 100644 index 0000000..6672323 --- /dev/null +++ b/src/map.h @@ -0,0 +1,15 @@ +#pragma once + +#include <stdint.h> + +typedef struct tag_t tag_t; + +typedef struct { + uint32_t len; + uint32_t capacity; + tag_t *entries; +} map_t; + +void map_init(map_t *map); +void map_free(map_t *map); +void map_put(map_t *map, tag_t *tag); |