Skip to content

ListNode

ListNode

Description

Doubly-linked list node

Fields

Name Description
next Reference to next node. NULL if no next node exists (tail).
prev Reference to previous node. NULL if no previous node exists (head).
data Type specific pointer to data.

Usage example (Cross-references)

Usage examples (Cross-references)
    /// Get node type stored by this list
    ///
    #define LIST_NODE_TYPE(list) ListNode(LIST_DATA_TYPE(list))
    
    ///
    #define List(T)                                                                                                        \
        struct {                                                                                                           \
            ListNode(T) * head;                                                                                            \
            ListNode(T) * tail;                                                                                            \
            GenericCopyInit   copy_init;                                                                                   \
        struct {                                                                                                           \
            ListNode(T) * head;                                                                                            \
            ListNode(T) * tail;                                                                                            \
            GenericCopyInit   copy_init;                                                                                   \
            GenericCopyDeinit copy_deinit;                                                                                 \
Last updated on