70 size_t initial_capacity);
ht_key_type_t
Type of the hashmap key.
bool ht_get(ht_hashmap_t *ht, const void *key, void *value_out)
Gets the value associated with a key.
void ht_destroy(ht_hashmap_t *ht)
Destroys the hashmap.
struct ht_hashmap ht_hashmap_t
Opaque type for the hashmap.
size_t ht_size(ht_hashmap_t *ht)
Gets the number of elements in the hashmap.
bool ht_insert(ht_hashmap_t *ht, const void *key, const void *value)
Inserts a key-value pair into the hashmap.
void ht_clear(ht_hashmap_t *ht)
Clears all elements from the hashmap.
ht_hashmap_t * ht_new(ht_key_type_t key_type, ht_value_type_t value_type, size_t initial_capacity)
Creates a new hashmap.
bool ht_remove(ht_hashmap_t *ht, const void *key)
Removes a key-value pair from the hashmap.
ht_value_type_t
Type of the hashmap value.
bool ht_is_empty(ht_hashmap_t *ht)
Checks if the hashmap is empty.