|
Libft
Custom implementation of core libc functions with additional utility helpers.
|

Functions | |
| 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. | |
| void bucket_replace | ( | t_list | bucket, |
| t_key_value * | new, | ||
| void(*)(void *) | del | ||
| ) |
Replaces the value of the pair matching new->key within a chain.
Walks the chain and, for the node whose key matches new->key, releases the existing pair (its value through del) and stores new in its place.
| bucket | Head of the bucket chain to update (borrowed). |
| new | Replacement pair carrying the matching key (ownership transferred). |
| del | Optional destructor applied to the replaced value (may be NULL). |

