From 144ae9c5ed156402a50efbb54ec7442ce0d66093 Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Fri, 17 Mar 2023 21:47:04 +0100 Subject: [PATCH] Add ID support for GAIA --- m-core.h | 2 ++ tests/test-mcore.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/m-core.h b/m-core.h index 003e6659..d42039c4 100644 --- a/m-core.h +++ b/m-core.h @@ -3577,6 +3577,8 @@ static inline size_t m_core_cstr_hash(const char str[]) #define M_REORDER_ARGLIST_FUNC_ARGPTR8(arglist) , & M_RET_ARG9 arglist , #define M_REORDER_ARGLIST_FUNC_ARGPTR9(arglist) , & M_RET_ARG10 arglist , +#define M_REORDER_ARGLIST_FUNC_ID(arg) , arg , M_EAT + /* Perform the API translation of the return code depending on the given keyword (NONE, EQ, NEQ, ...).) */ #define M_REORDER_RET_NONE(...) /* Nothing */ diff --git a/tests/test-mcore.c b/tests/test-mcore.c index ada38d91..25a99ff8 100644 --- a/tests/test-mcore.c +++ b/tests/test-mcore.c @@ -875,7 +875,7 @@ static void test_generic_api(void) assert( M_HEAD_2(18, 17, 0) == 17); assert( M_TAIL_2(18, 17, 8) == 8); -#define GO1 (INIT(API( init3, ARG1, ARGPTR2, 17, 43 ))) +#define GO1 (INIT(API( init3, ARG1, ARGPTR2, 17, ID(-43) ))) #define GO2 (INIT(API( init3, NONE, ARGPTR2, 0, ARG1 ))) #define GO3 (EQUAL(API( cmp2, EQ(0), ARGPTR1, ARGPTR2 ))) #define GO4 (EQUAL(API( cmp1, EQ(0), ARG1, ARG2 )))