MapMustSet
Description
Aborting variant of MapSet. See that macro for parameter semantics and success-state effects.
Success
Returns to the caller. The underlying MapSet call succeeded; see MapSet for the post-state.
Failure
Does not return - aborts via LOG_FATAL / Abort when the underlying MapSet call returns false.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Insert.h:592:
do { \
if (!MapSet((m), (in_key), (in_value))) { \
LOG_FATAL("MapMustSet failed"); \
} \
} while (0)- In
Map.Insert.c:691:
int msk = 5;
int msv = 55;
MapMustSet(&map, msk, msv); // aliases SetOnlyL: zeroes both sources
result = result && (msk == 0) && (msv == 0);
result = result && (MapValueCountForKey(&map, 5) == 1);
Last updated on