|
Libft
Custom implementation of core libc functions with additional utility helpers.
|
#include "libft.h"
Functions | |
| void | buckets_foreach (t_vector *vector, void(*del)(void *), void(*f)(void *, void(*del)(void *))) |
| Applies a function to every used bucket slot. | |
| void buckets_foreach | ( | t_vector * | vector, |
| void(*)(void *) | del, | ||
| void(*)(void *, void(*del)(void *)) | f | ||
| ) |
Applies a function to every used bucket slot.
Iterates over the first vector->len slots and calls f with the address of each bucket slot and the del callback, allowing f to free or mutate the chain stored there.
| vector | Pointer to the bucket vector to iterate (borrowed). |
| del | Destructor forwarded to f for each slot (may be NULL). |
| f | Function applied to each bucket slot (borrowed). |
