MapMustSetFirstR
Description
Aborting variant of MapSetFirstR. See that macro for parameter semantics and success-state effects.
Success
Returns to the caller. The underlying MapSetFirstR call succeeded; see MapSetFirstR for the post-state.
Failure
Does not return - aborts via LOG_FATAL / Abort when the underlying MapSetFirstR call returns false.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Insert.h:540:
do { \
if (!MapSetFirstR((m), (in_key), (in_value))) { \
LOG_FATAL("MapMustSetFirstR failed"); \
} \
} while (0)- In
Map.Insert.c:670:
// SetFirstR updates the existing first value of key 2 (insert was 20).
MapMustSetFirstR(&map, 2, 222);
result = result && MapGetFirstPtr(&map, 2) && (*MapGetFirstPtr(&map, 2) == 222);
Last updated on