ListPushFrontR
Description
Prepend an element at the head of the list. R-value form.
Success
Returns true. A new node holding a copy of rval is linked as the new head; the list length grows by one.
Failure
Returns false on allocation failure. The list is unchanged.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
ListInt.c:44:
case LIST_INT_PUSH_FRONT : {
i32 value = (i32)extract_u32(data, offset, data_size);
ListPushFrontR(list, value);
break;
}- In
List.Insert.c:65:
ListInsert(&list, c, 1);
ListPushFrontL(&list, d);
ListPushFrontR(&list, h);
ListPushBackR(&list, e);
ListPushFront(&list, f);- In
Insert.h:364:
#define ListMustPushFrontR(l, rval) \
do { \
if (!ListPushFrontR((l), (rval))) { \
LOG_FATAL("ListMustPushFrontR failed"); \
} \
Last updated on