Libft
Custom implementation of core libc functions with additional utility helpers.
Loading...
Searching...
No Matches
utils.c File Reference
#include "libft.h"
Include dependency graph for utils.c:

Functions

void buckets_foreach (t_vector *vector, void(*del)(void *), void(*f)(void *, void(*del)(void *)))
 Applies a function to every used bucket slot.
 

Function Documentation

◆ buckets_foreach()

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.

Parameters
vectorPointer to the bucket vector to iterate (borrowed).
delDestructor forwarded to f for each slot (may be NULL).
fFunction applied to each bucket slot (borrowed).
Here is the caller graph for this function: