From 27d9eb9056010edbceaf6ce87809d0fbc4e1648a Mon Sep 17 00:00:00 2001 From: Johannes Lorenz Date: Sun, 29 Oct 2023 00:58:28 +0200 Subject: [PATCH] MAC_EACH EXPAND --- include/rtosc/port-sugar.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/include/rtosc/port-sugar.h b/include/rtosc/port-sugar.h index 3a13275..9d7c8f4 100644 --- a/include/rtosc/port-sugar.h +++ b/include/rtosc/port-sugar.h @@ -133,21 +133,21 @@ struct rtosc_hack_decltype_t //arguments: counting offset, macro, macro args #define MAC_EACH_0(o,m,d,x, ...) INSUFFICIENT_ARGUMENTS_PROVIDED_TO_MAC_EACH #define MAC_EACH_1(o,m,d,x, ...) m(o,d,x) -#define MAC_EACH_2(o,m,d,x, ...) m(o,d,x) MAC_EACH_1(rINC(o),m,d, __VA_ARGS__) -#define MAC_EACH_3(o,m,d,x, ...) m(o,d,x) MAC_EACH_2(rINC(o),m,d, __VA_ARGS__) -#define MAC_EACH_4(o,m,d,x, ...) m(o,d,x) MAC_EACH_3(rINC(o),m,d, __VA_ARGS__) -#define MAC_EACH_5(o,m,d,x, ...) m(o,d,x) MAC_EACH_4(rINC(o),m,d, __VA_ARGS__) -#define MAC_EACH_6(o,m,d,x, ...) m(o,d,x) MAC_EACH_5(rINC(o),m,d, __VA_ARGS__) -#define MAC_EACH_7(o,m,d,x, ...) m(o,d,x) MAC_EACH_6(rINC(o),m,d, __VA_ARGS__) -#define MAC_EACH_8(o,m,d,x, ...) m(o,d,x) MAC_EACH_7(rINC(o),m,d, __VA_ARGS__) -#define MAC_EACH_9(o,m,d,x, ...) m(o,d,x) MAC_EACH_8(rINC(o),m,d, __VA_ARGS__) -#define MAC_EACH_10(o,m,d,x, ...) m(o,d,x) MAC_EACH_9(rINC(o),m,d, __VA_ARGS__) -#define MAC_EACH_11(o,m,d,x, ...) m(o,d,x) MAC_EACH_10(rINC(o),m,d, __VA_ARGS__) -#define MAC_EACH_12(o,m,d,x, ...) m(o,d,x) MAC_EACH_11(rINC(o),m,d, __VA_ARGS__) -#define MAC_EACH_13(o,m,d,x, ...) m(o,d,x) MAC_EACH_12(rINC(o),m,d, __VA_ARGS__) -#define MAC_EACH_14(o,m,d,x, ...) m(o,d,x) MAC_EACH_13(rINC(o),m,d, __VA_ARGS__) -#define MAC_EACH_15(o,m,d,x, ...) m(o,d,x) MAC_EACH_14(rINC(o),m,d, __VA_ARGS__) -#define MAC_EACH_16(o,m,d,x, ...) m(o,d,x) MAC_EACH_15(rINC(o),m,d, __VA_ARGS__) +#define MAC_EACH_2(o,m,d,x, ...) m(o,d,x) EXPAND(MAC_EACH_1(rINC(o),m,d, __VA_ARGS__)) +#define MAC_EACH_3(o,m,d,x, ...) m(o,d,x) EXPAND(MAC_EACH_2(rINC(o),m,d, __VA_ARGS__)) +#define MAC_EACH_4(o,m,d,x, ...) m(o,d,x) EXPAND(MAC_EACH_3(rINC(o),m,d, __VA_ARGS__)) +#define MAC_EACH_5(o,m,d,x, ...) m(o,d,x) EXPAND(MAC_EACH_4(rINC(o),m,d, __VA_ARGS__)) +#define MAC_EACH_6(o,m,d,x, ...) m(o,d,x) EXPAND(MAC_EACH_5(rINC(o),m,d, __VA_ARGS__)) +#define MAC_EACH_7(o,m,d,x, ...) m(o,d,x) EXPAND(MAC_EACH_6(rINC(o),m,d, __VA_ARGS__)) +#define MAC_EACH_8(o,m,d,x, ...) m(o,d,x) EXPAND(MAC_EACH_7(rINC(o),m,d, __VA_ARGS__)) +#define MAC_EACH_9(o,m,d,x, ...) m(o,d,x) EXPAND(MAC_EACH_8(rINC(o),m,d, __VA_ARGS__)) +#define MAC_EACH_10(o,m,d,x, ...) m(o,d,x) EXPAND(MAC_EACH_9(rINC(o),m,d, __VA_ARGS__)) +#define MAC_EACH_11(o,m,d,x, ...) m(o,d,x) EXPAND(MAC_EACH_10(rINC(o),m,d, __VA_ARGS__)) +#define MAC_EACH_12(o,m,d,x, ...) m(o,d,x) EXPAND(MAC_EACH_11(rINC(o),m,d, __VA_ARGS__)) +#define MAC_EACH_13(o,m,d,x, ...) m(o,d,x) EXPAND(MAC_EACH_12(rINC(o),m,d, __VA_ARGS__)) +#define MAC_EACH_14(o,m,d,x, ...) m(o,d,x) EXPAND(MAC_EACH_13(rINC(o),m,d, __VA_ARGS__)) +#define MAC_EACH_15(o,m,d,x, ...) m(o,d,x) EXPAND(MAC_EACH_14(rINC(o),m,d, __VA_ARGS__)) +#define MAC_EACH_16(o,m,d,x, ...) m(o,d,x) EXPAND(MAC_EACH_15(rINC(o),m,d, __VA_ARGS__)) #define MAC_EACH_IMP(off, mac, data, count, ...) \ EXPAND(MAC_EACH_ ##count(off, mac, data, __VA_ARGS__))