From 9d4fa04c41ce44ad8bfaa9cce65e2b26d8b642d1 Mon Sep 17 00:00:00 2001 From: sanine Date: Wed, 25 Aug 2021 09:26:32 -0500 Subject: add hs_parse_overloaded_ definition and update hs_parse_overloaded tests --- src/honeysuckle.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/honeysuckle.h') 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, ...); -- cgit v1.2.1