Static list initializer

This commit is contained in:
Maria Matejka 2022-03-02 11:22:01 +01:00
parent d071aca7aa
commit 2e8b8bfcc4

View file

@ -42,6 +42,7 @@ typedef union list { /* In fact two overlayed nodes */
};
} list;
#define STATIC_LIST_INIT(name) name = { .head = &name.tail_node, .tail = &name.head_node, .null = NULL }
#define NODE (node *)
#define HEAD(list) ((void *)((list).head))