From 9c59684b61f65f7dc3255d7f06ab5fe2b6f60b80 Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Sat, 4 Jun 2022 23:34:46 +0200 Subject: [PATCH] Fix the OPLIST args of TUPLE_OPLIST so that the given oplists match the types used for the definition of the tuple --- example/ex-multi04.c | 4 ++-- example/ex11-json01.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/example/ex-multi04.c b/example/ex-multi04.c index 6a807738..d8977898 100644 --- a/example/ex-multi04.c +++ b/example/ex-multi04.c @@ -19,13 +19,13 @@ TUPLE_DEF2(record, (fields, symbol_list_t)) #define M_OPL_record_t() TUPLE_OPLIST(record, M_OPL_symbol_list_t()) TUPLE_DEF2(my_tuple, (name, string_t), (value, int)) -#define M_OPL_my_tuple_t() TUPLE_OPLIST(my_tuple) +#define M_OPL_my_tuple_t() TUPLE_OPLIST(my_tuple, STRING_OPLIST, M_BASIC_OPLIST) ARRAY_DEF(my_list_of_tuple, my_tuple_t) #define M_OPL_my_list_of_tuple_t() ARRAY_OPLIST(my_list_of_tuple) TUPLE_DEF2(my_tuple_of_tuple, (name, string_t), (inner_tuple, my_tuple_t)) -#define M_OPL_my_tuple_of_tuple_t() TUPLE_OPLIST(my_tuple_of_tuple) +#define M_OPL_my_tuple_of_tuple_t() TUPLE_OPLIST(my_tuple_of_tuple, STRING_OPLIST, M_OPL_my_tuple_t() ) LIST_DEF(list_of_tuple_of_tuple, my_tuple_of_tuple_t) #define M_OPL_list_of_tuple_of_tuple_t() LIST_OPLIST(list_of_tuple_of_tuple, M_OPL_my_tuple_of_tuple_t() ) diff --git a/example/ex11-json01.c b/example/ex11-json01.c index e2044cc7..9eba8e21 100644 --- a/example/ex11-json01.c +++ b/example/ex11-json01.c @@ -9,7 +9,7 @@ TUPLE_DEF2(person, (present, bool) ) // Register the oplist of this tuple globaly -#define M_OPL_person_t() TUPLE_OPLIST(person, M_BASIC_OPLIST, STRING_OPLIST, M_BASIC_OPLIST ) +#define M_OPL_person_t() TUPLE_OPLIST(person, STRING_OPLIST, M_BASIC_OPLIST, M_BOOL_OPLIST ) // Let's define an array of person ARRAY_DEF(base, person_t)