Skip to content

ListPushBackL

Description

Append an element at the tail of the list. L-value ownership form.

Success

Returns true. A new node holding lval’s payload is linked as the new tail; the list length grows by one. When the list has no copy_init handler, lval has been zeroed.

Failure

Returns false on allocation failure. The list and lval are unchanged.

Usage example (Cross-references)

Usage examples (Cross-references)
        ListPushBackR(&list, e);
        ListPushFront(&list, f);
        ListPushBackL(&list, i);
        ListPushBack(&list, g);
    /// TAGS: List, PushBack, Insert
    ///
    #define ListPushBack(l, lval) ListPushBackL((l), (lval))
    
    ///
    #define ListMustPushBackL(l, lval)                                                                                     \
        do {                                                                                                               \
            if (!ListPushBackL((l), (lval))) {                                                                             \
                LOG_FATAL("ListMustPushBackL failed");                                                                     \
            }                                                                                                              \
Last updated on