diff options
author | sanine <sanine.not@pm.me> | 2021-08-25 09:26:32 -0500 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2021-08-25 09:26:32 -0500 |
commit | 9d4fa04c41ce44ad8bfaa9cce65e2b26d8b642d1 (patch) | |
tree | b471c97e753a53239dbc61dbb060f24e88a87ff6 /src/honeysuckle.h | |
parent | 801840a44257d95376a5f7d5fe97d87b9f16bd93 (diff) |
add hs_parse_overloaded_ definition and update hs_parse_overloaded tests
Diffstat (limited to 'src/honeysuckle.h')
-rw-r--r-- | src/honeysuckle.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/honeysuckle.h b/src/honeysuckle.h index 9aecddf..584c4bd 100644 --- a/src/honeysuckle.h +++ b/src/honeysuckle.h @@ -64,7 +64,19 @@ void hs_parse_args_(lua_State *L, int n_args, struct hs_arg *arguments); hs_parse_args_(L, VA_NARGS(__VA_ARGS__)/2, (struct hs_arg[]) { __VA_ARGS__ }) -//int hs_parse_overloaded_(lua_State *L, ...); +#define hs_overload(...) VA_NARGS(__VA_ARGS__)/2, (struct hs_arg[]) { __VA_ARGS__ } + +int hs_parse_overloaded_(lua_State *L, ...); + +#define hs_parse_overloaded(L, ...) \ + hs_parse_overloaded_(L, __VA_ARGS__, -1) + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + * + * hs_create_table + * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + */ int hs_create_table(lua_State *L, ...); |