summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2020-11-19 16:49:03 -0800
committerVito Caputo <vcaputo@pengaru.com>2020-11-19 16:49:03 -0800
commit070e8c57d5829e9b429f698c329a6d0b0d4d071c (patch)
tree77bff2786bcdf5ced6ae14153b54922c2703858d
parent58563f46c53d4677f8db57bb0689614834fdc43b (diff)
thunk: fixup expand max number of thunk parameters to 12
f73822 was supposed to do this, but I messed up expanding the C99_NARGS macro fully. NARGS also needs to support 2X the desired number of parameters as they're supplied in {type, name} pairs. 12 is the maximum number of pairs supported at this time, adding more is trivial when needed.
-rw-r--r--thunk.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/thunk.h b/thunk.h
index 262137f..2cd607f 100644
--- a/thunk.h
+++ b/thunk.h
@@ -33,8 +33,8 @@ struct thunk_t {
#define _C99_NARGS(...) \
_C99_NARGS1( , ##__VA_ARGS__)
#define _C99_NARGS1(...) \
- _C99_NARGS2(__VA_ARGS__, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0)
-#define _C99_NARGS2(_, x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, _n, ...) \
+ _C99_NARGS2(__VA_ARGS__, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0)
+#define _C99_NARGS2(_, x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, _n, ...) \
_n
/* Macros for declaring the thunk environment struct members, we need a variant
© 2021 All Rights Reserved