Add LIST_INIT_VALUE & LIST_DUAL_PUSH_INIT_VALUE.

This commit is contained in:
Patrick Pelissier committed 2021-08-15 21:55:09 +02:00
1 parent f8b4f44105
commit 2178dcfcab
4 files changed
+55 -2

No files matched your search

+15
View File
@@ -68,6 +68,21 @@
((__VA_ARGS__, M_DEFAULT_OPLIST ), \
(__VA_ARGS__ )))
/* Define an init value to init global variables of type list.
USAGE:
list_t global_variable = LIST_INIT_VALUE();
*/
#define LIST_INIT_VALUE() \
{ NULL }
/* Define an init value to init global variables of type dual push list.
USAGE:
list_t global_variable = LIST_DUAL_PUSH_INIT_VALUE();
*/
#define LIST_DUAL_PUSH_INIT_VALUE() \
{ { NULL, NULL } }
/********************************** INTERNAL ************************************/