map.c
Implements the map data structure.
- Author: Edward Jones
- Date: 2021-09-17
next_non_empty_bucket
Find the next non-empty bucket with an index strictly after a specified index.
- Param
map
: Map to search - Param
curr
: Strict index lower bound
Returns: true
iff a non-empty bucket at index > curr
was found, else false
static bool next_non_empty_bucket(Map* map, unsigned int* curr);
pkcmp
Key comparator function between a kv pair and a specific key.
- Param
kcmp
: Location of the key comparator function
Returns: A lambda function which compares its input v1
to the key of its input v2
#define pkcmp(kcmp) lambda(Cmp, (void* v1, void* v2), kcmp(v1, ((Pair*)v2)->p0))