ListPushBack
Description
Default tail-push aliases the L-form: link a new node holding lval’s payload as the new tail, taking ownership of lval when no deep-copy handler is configured.
Parameters
| Name | Direction | Description |
|---|---|---|
l |
in,out | List handle. |
lval |
in | Addressable element to append. |
Success
Returns true; the list length grows by one.
Failure
Returns false on allocation failure; the list and lval are unchanged.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
List.Insert.c:69:
ListPushFront(&list, f);
ListPushBackL(&list, i);
ListPushBack(&list, g);
bool result =- In
Insert.h:433:
#define ListMustPushBack(l, lval) \
do { \
if (!ListPushBack((l), (lval))) { \
LOG_FATAL("ListMustPushBack failed"); \
} \
Last updated on