diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2020-11-04 02:38:17 -0800 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2020-11-04 02:38:17 -0800 |
commit | 9274a3718da767a644df883e6a2ea1e58e060180 (patch) | |
tree | 327cb53938b38dcfbdf205e1ede7906f7270f3d9 | |
parent | 214297a0a6ed78dc6f1ab0ce10dc146b57fa903e (diff) |
thunk: double up THUNK() macro
this is necessary for nested THUNK() constructions, e.g.:
thunk_t * closure = THUNK(a, b, c, THUNK(d, e, f));
-rw-r--r-- | thunk.h | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -416,9 +416,12 @@ struct thunk_t { /* Call the appropriate instantiate function which returns an embedded thunk_t, * this is how you prepare the thunks established via THUNK_DEFINE(). */ -#define THUNK(_call) \ +#define _THUNK(_call) \ __thunk_instantiate_##_call +#define THUNK(_call) \ + _THUNK(_call) + /* Call the function associated with a prepared thunk, supplying the bound environment * as arguments. This is how code receiving generic thunks executes them. */ static inline int thunk_dispatch(thunk_t *thunk) { |