aboutsummaryrefslogtreecommitdiff
path: root/htab.h
diff options
context:
space:
mode:
Diffstat (limited to 'htab.h')
-rw-r--r--htab.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/htab.h b/htab.h
new file mode 100644
index 0000000..eb0b663
--- /dev/null
+++ b/htab.h
@@ -0,0 +1,13 @@
+struct hashtablekey {
+ uint64_t hash;
+ const char *str;
+ size_t len;
+};
+
+void htabstrkey(struct hashtablekey *, const char *);
+void htabbufkey(struct hashtablekey *, const char *, size_t);
+
+struct hashtable *mkhtab(size_t);
+void delhtab(struct hashtable *, void(void *));
+void **htabput(struct hashtable *, struct hashtablekey *);
+void *htabget(struct hashtable *, struct hashtablekey *);