76 void (*f)(
void *,
void (*del)(
void *)));
87void bucket_free(
void *bucket_ptr,
void (*del)(
void *));
void buckets_swap(t_vector *buckets1, t_vector *buckets2)
Swaps the contents of two bucket vectors.
Definition swap.c:15
void buckets_free(t_vector *buckets, void(*del)(void *))
Frees the bucket array and every pair it contains.
Definition init.c:37
void buckets_detach(t_vector *buckets)
Detaches every pair from the bucket chains without freeing them.
Definition detach.c:29
void bucket_free(void *bucket_ptr, void(*del)(void *))
Frees a single bucket chain and its pairs.
Definition init.c:16
void bucket_replace(t_list bucket, t_key_value *new, void(*del)(void *))
Replaces the value of the pair matching new->key within a chain.
Definition replace.c:16
void buckets_foreach(t_vector *vector, void(*del)(void *), void(*f)(void *, void(*del)(void *)))
Applies a function to every used bucket slot.
Definition utils.c:15
void bucket_detach(void *bucket, void(*_)(void *))
Detaches every pair from a single bucket chain without freeing them.
Definition detach.c:16
bool bucket_contains(t_list bucket, const char *key)
Tests whether a bucket chain holds a pair with the given key.
Definition contains.c:16
bool buckets_init(t_vector *buckets, size_t init_cap)
Initializes the bucket array.
Definition init.c:29
Key/value pair stored inside a hashmap bucket.
Definition libft.h:192
Doubly linked list node structure.
Definition libft.h:102
Dynamic array storing contiguous fixed-size items.
Definition libft.h:160