diff options
Diffstat (limited to 'lib/hashtable.c')
-rw-r--r-- | lib/hashtable.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/hashtable.c b/lib/hashtable.c index 00e05d7..2015b9c 100644 --- a/lib/hashtable.c +++ b/lib/hashtable.c @@ -30,10 +30,9 @@ static int hash(char* key, size_t bucket_len) { return sum % bucket_len; } -HashTable hashtable_init() { +HashTable hashtable_init(size_t capacity) { HashTableImpl* ht = (HashTableImpl*) malloc(sizeof(HashTableImpl)); - int capacity = 8; ht->buckets = (HashTableBucket*) calloc(sizeof(HashTableBucket), capacity); ht->capacity = capacity; |