add init function

This commit is contained in:
Julian Daube 2017-10-25 20:30:00 +02:00
parent ee37ac4da9
commit d5e58616a2

View File

@ -23,6 +23,10 @@ entry_hash_t key_hash(entry_key_t key) {
return strhash_str(key) + 1; // make hash always nonzero
}
void hashtable_init(struct hashtable * table) {
memset(table, 0, sizeof(table));
}
hashtable_iterator_t hashtable_end(struct hashtable * table) {
return table->data + table->len;
}