diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2018-05-17 15:14:06 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2018-05-17 15:14:06 -0700 |
commit | ed975aace68fcd8a433ee4246eb313cab1c2d503 (patch) | |
tree | 7fa1a6ec7575a8f5462ee238435da2041ec52df0 | |
parent | 38be3528bb544bd2fa0101b096186014a1161cc5 (diff) |
thunk: default to static for everything
If there comes a time when this is an issue, selector may be
added and a separate declaration macro provided.
For now, it appears static use is generally the appropriate
thing to do.
-rw-r--r-- | thunk.h | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -306,14 +306,14 @@ struct thunk_t { * accepting a (thunk_t *) by simply wrapping the call with THUNK(). */ #define THUNK_DEFINE(_name, ...) \ - int _THUNK_GEN_PROTO(_name, __VA_ARGS__); \ + static int _THUNK_GEN_PROTO(_name, __VA_ARGS__); \ typedef struct __thunk_environment_##_name { \ /* struct for encapsulating the calling environment */ \ thunk_t __thunk; \ _THUNK_GEN_STRUCT (__VA_ARGS__); \ } __thunk_environment_##_name; \ \ - int __thunk_dispatch_##_name(thunk_t *thunk) { \ + static int __thunk_dispatch_##_name(thunk_t *thunk) { \ /* dispatch thunk from associated environment */ \ __thunk_environment_##_name *env; \ int r; \ @@ -329,7 +329,7 @@ struct thunk_t { return r; \ } \ \ - thunk_t * _THUNK_GEN_PROTO(__thunk_instantiate_##_name, __VA_ARGS__) { \ + static thunk_t * _THUNK_GEN_PROTO(__thunk_instantiate_##_name, __VA_ARGS__) {\ /* allocate and populate environment, return it */ \ __thunk_environment_##_name *env; \ \ @@ -342,7 +342,7 @@ struct thunk_t { return &env->__thunk; \ } \ \ - int _THUNK_GEN_PROTO(_name, __VA_ARGS__) + static int _THUNK_GEN_PROTO(_name, __VA_ARGS__) /* Call the appropriate instantiate function which returns an embedded thunk_t, * this is how you prepare the thunks established via THUNK_DEFINE(). */ |