summaryrefslogtreecommitdiffstats
path: root/src/hashset.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/hashset.h')
-rw-r--r--src/hashset.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/hashset.h b/src/hashset.h
new file mode 100644
index 00000000..7e035c02
--- /dev/null
+++ b/src/hashset.h
@@ -0,0 +1,16 @@
+#ifndef foohashsethfoo
+#define foohashsethfoo
+
+struct hashset;
+
+struct hashset *hashset_new(unsigned (*hash_func) (const void *p), int (*compare_func) (const void*a, const void*b));
+void hashset_free(struct hashset*, void (*free_func)(void *p, void *userdata), void *userdata);
+
+int hashset_put(struct hashset *h, const void *key, void *value);
+void* hashset_get(struct hashset *h, const void *key);
+
+int hashset_remove(struct hashset *h, const void *key);
+
+unsigned hashset_ncontents(struct hashset *h);
+
+#endif