MapMustSetOnlyL
Description
Aborting variant of MapSetOnlyL. See that macro for parameter semantics and success-state effects.
Success
Returns to the caller. The underlying MapSetOnlyL call succeeded; see MapSetOnlyL for the post-state.
Failure
Does not return - aborts via LOG_FATAL / Abort when the underlying MapSetOnlyL call returns false.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Insert.h:558:
do { \
if (!MapSetOnlyL((m), (in_key), (in_value))) { \
LOG_FATAL("MapMustSetOnlyL failed"); \
} \
} while (0)- In
Map.Insert.c:684:
int so = 50;
int sk = 4;
MapMustSetOnlyL(&map, sk, so); // replace + zero both sources
result = result && (sk == 0) && (so == 0);
result = result && (MapValueCountForKey(&map, 4) == 1);
Last updated on