Fix issue of recusrive definition of TUPLE using GLOBAL oplist:

There was a recursive call of M_REDUCE2 that fails to expand properly on its second invocation
Rewrite fully how global oplists are implemented:
it performs a first pass to expand the oplists, and the a separate pass to define the functions.
This enables to separate the pass, and use M_REDUCE2 in both.
This commit is contained in:
Patrick Pelissier committed 2018-08-19 08:28:17 +02:00
1 parent e835dbc7c6
commit 6ef9936e24
2 files changed
+74 -88

No files matched your search

+4
View File
@@ -61,6 +61,10 @@ TUPLE_DEF2(rtuple,
(name, string_t))
#define M_OPL_rtuple_t() TUPLE_OPLIST(rtuple, M_OPL_pair_str_t(), STRING_OPLIST)
TUPLE_DEF2(rtuple2, (name, string_t), (value, int))
#define M_OPL_rtuple2_t() TUPLE_OPLIST(rtuple2, STRING_OPLIST, M_DEFAULT_OPLIST)
TUPLE_DEF2(rtuple3, (name, string_t), (ituple2, rtuple2_t), (ituple, rtuple_t) )
static void check_swap(void)
{