From 8b6acc85633520f109d348c5e46c8a89521b3932 Mon Sep 17 00:00:00 2001 From: Flavian Kaufmann Date: Wed, 21 May 2025 14:05:27 +0200 Subject: procedures --- include/hashmap.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 include/hashmap.h (limited to 'include/hashmap.h') diff --git a/include/hashmap.h b/include/hashmap.h new file mode 100644 index 0000000..c62a319 --- /dev/null +++ b/include/hashmap.h @@ -0,0 +1,23 @@ +#ifndef HASHMAP_H +#define HASHMAP_H + + +typedef struct HashMap *hashmap_t; +typedef struct HashMapKeys *hashmap_keys_t; + + +hashmap_t hashmap_create(void); +void hashmap_free(hashmap_t map); + +void **hashmap_get(hashmap_t map, const char *key); +void hashmap_insert(hashmap_t map, const char *key, void *value); +int hashmap_delete(hashmap_t map, const char *key); + +void hashmap_iterate(hashmap_t map, void (*callback)(const char *key, void *value)); +hashmap_keys_t hashmap_keys_create(hashmap_t map); +const char *hashmap_keys_next(hashmap_keys_t iter); +void hashmap_keys_free(hashmap_keys_t iter); + + + +#endif \ No newline at end of file -- cgit v1.2.3