Go to the documentation of this file.
16 static void hashmap_rehash(
t_hashmap *hm,
void **old_keys,
void **old_vals,
23 while (i < old_capacity)
25 if (old_keys[i] != NULL)
49 hashmap_rehash(hm, old_keys, old_vals, old_capacity);
66 hashmap_rehash(hm, old_keys, old_vals, old_capacity);
const t_type * key_type
The type of keys in the hashmap.
void hashmap_put(t_hashmap *hm, const void *key, const void *val)
Adds a key-value pair to the symbol table.
size_t size
The number of elements in the hashmap.
void * ds_xcalloc(size_t count, size_t size)
Replicates behaviour of calloc from libc, but fails on memory allocation errors.
A symbol table of generic key-value pairs, implemented as a dynamically resizing linear-probing hashm...
void(* del)(void *)
A function pointer used to free the memory taken by the data type.
const t_type * val_type
The type of values in the hashmap.
size_t capacity
The current capacity of the hashmap.