Skip to content

Commit

Permalink
MAC_EACH EXPAND
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesLorenz committed Oct 28, 2023
1 parent 8b42593 commit 27d9eb9
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions include/rtosc/port-sugar.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__))
Expand Down

0 comments on commit 27d9eb9

Please sign in to comment.