From 02e8681f768c9a9980739b2bbbf072d05505d8ac Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Thu, 2 Aug 2018 20:02:15 +0200 Subject: [PATCH] M_GLOBAL_OPLIST: More robust implementation that delays the evaluation of the concatenation --- m-core.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/m-core.h b/m-core.h index 366a9edd..ffaa3502 100644 --- a/m-core.h +++ b/m-core.h @@ -1891,8 +1891,9 @@ m_core_hash (const void *str, size_t length) otherwise it returns the argument. Global oplist is limited to typedef types. */ -#define M_GLOBAL_OPLIST(a) \ - M_IF( M_OPLIST_P(a))(a, M_GLOBALI_OPLIST_ELSE(a)) +#define M_GLOBAL_OPLIST(a) \ + M_IF( M_OPLIST_P(a))(M_GLOBALI_ID, M_GLOBALI_OPLIST_ELSE)(a) +#define M_GLOBALI_ID(a) a #define M_GLOBALI_OPLIST_ELSE(a) M_GLOBALI_OPLIST_ELSE2(a, M_C(M_OPL_, a)()) #define M_GLOBALI_OPLIST_ELSE2(a, op) M_IF( M_OPLIST_P (op))(op, a)