diff options
author | Tom Smeding <tom.smeding@gmail.com> | 2020-07-01 23:11:05 +0200 |
---|---|---|
committer | Tom Smeding <tom.smeding@gmail.com> | 2020-07-01 23:11:05 +0200 |
commit | f695f9046b5793796ebd703ad816f19637403473 (patch) | |
tree | 7306e3315d086329783949151df25622c061ab9c /hashtable.h | |
parent | 13198c13cd9d610e19cc8ab18a917b4b1505b123 (diff) |
Growing hash table of conn_data's in main
Diffstat (limited to 'hashtable.h')
-rw-r--r-- | hashtable.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/hashtable.h b/hashtable.h new file mode 100644 index 0000000..b85c2e0 --- /dev/null +++ b/hashtable.h @@ -0,0 +1,15 @@ +#pragma once + + +struct hashtable; + +struct hashtable* ht_alloc(); +void ht_free(struct hashtable *ht); + +void ht_insert(struct hashtable *ht, unsigned int key, void *value); + +// Returns NULL if key is not present in the table. +void* ht_find(const struct hashtable *ht, unsigned int key); + +// Does nothing if the key is not present in the table. +void ht_delete(struct hashtable *ht, unsigned int key); |