#define HASHMAP_INIT_CAPACITY
The default initial capacity of a newly initialized hashmap.
const t_type * key_type
The type of keys in the hashmap.
t_hashmap * hashmap_new(const t_type *key_type, const t_type *val_type)
Initializes a new empty map.
void * ds_xcalloc(size_t count, size_t size)
Replicates behaviour of calloc from libc, but fails on memory allocation errors.
size_t(* hash)(const void *, size_t)
(optional) A function pointer used to get a hash value of this data type
A full representation of a data type, used to achieve polymorphism in the implementation of data stru...
A symbol table of generic key-value pairs, implemented as a dynamically resizing linear-probing hashm...
const t_type * val_type
The type of values in the hashmap.
void ds_exit_set(int err)
Set errno to the specified value, print the error message, and exit the process.
size_t capacity
The current capacity of the hashmap.