aboutsummaryrefslogtreecommitdiff
path: root/include/hashmap.h
diff options
context:
space:
mode:
authorFlavian Kaufmann <flavian@flaviankaufmann.ch>2025-05-21 14:05:27 +0200
committerFlavian Kaufmann <flavian@flaviankaufmann.ch>2025-05-21 14:05:27 +0200
commit8b6acc85633520f109d348c5e46c8a89521b3932 (patch)
tree1196ec5c493fd57937e7c84ca6ffb9f2d511b264 /include/hashmap.h
parent442eba08dba74c3254a8d089ca1961147e59972b (diff)
downloadimp-8b6acc85633520f109d348c5e46c8a89521b3932.tar.gz
imp-8b6acc85633520f109d348c5e46c8a89521b3932.zip
procedures
Diffstat (limited to 'include/hashmap.h')
-rw-r--r--include/hashmap.h23
1 files changed, 23 insertions, 0 deletions
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