add init function
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user