Fix issue of recursive usage of M_GLOBAL_OPLIST_OR_DEF

Update the way to use the macro to avoid being limited by the
preprocessor limitation.
This commit is contained in:
Patrick Pelissier committed 2018-09-14 20:57:55 +02:00
1 parent 8f67ca339b
commit 2e3b312fab
17 files changed
+57 -42

No files matched your search

+2 -2
View File
@@ -32,7 +32,7 @@
USAGE: ISHARED_OPLIST(name [, oplist_of_the_type]) */
#define ISHARED_PTR_OPLIST(...) \
ISHAREDI_PTR_OPLIST(M_IF_NARGS_EQ1(__VA_ARGS__) \
((__VA_ARGS__, M_GLOBAL_OPLIST_OR_DEF(__VA_ARGS__) ), \
((__VA_ARGS__, M_GLOBAL_OPLIST_OR_DEF(__VA_ARGS__)() ), \
(__VA_ARGS__ )))
/* Interface to add to a structure to allow intrusive support.
@@ -46,7 +46,7 @@
USAGE: ISHARED_PTR_DEF(name[, oplist]) */
#define ISHARED_PTR_DEF(name, ...) \
ISHAREDI_PTR_DEF(M_IF_NARGS_EQ1(__VA_ARGS__) \
((name, __VA_ARGS__, M_GLOBAL_OPLIST_OR_DEF(__VA_ARGS__) ), \
((name, __VA_ARGS__, M_GLOBAL_OPLIST_OR_DEF(__VA_ARGS__)() ), \
(name, __VA_ARGS__ )))