Static list initializer
This commit is contained in:
parent
d071aca7aa
commit
2e8b8bfcc4
1 changed files with 1 additions and 0 deletions
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue