#ifndef HONEYSUCKLE_H #define HONEYSUCKLE_H #include #include #include #include #define HS_END 0 /* type constants */ #define HS_BOOL 1 #define HS_INT 2 #define HS_NUM 3 #define HS_STR 4 #define HS_TBL 5 #define HS_FUNC 6 #define HS_CFUNC 7 #define HS_USER 8 #define HS_LIGHT 9 #define HS_NIL 10 #define HS_ANY 11 const char* hs_type_to_string(int type); void hs_parse_args(lua_State *L, ...); int hs_parse_overloaded(lua_State *L, ...); int hs_create_table(lua_State *L, ...); int hs_create_enum(lua_State *L, ...); void hs_process_table(lua_State *L, int table_index, void *data, ...); // default processors void hs_pt_set_boolean(bool value, void *data); void hs_pt_set_integer(lua_Integer value, void *data); void hs_pt_set_number(lua_Number value, void *data); void hs_pt_set_string(const char *value, void *data); void hs_throw_error(lua_State *L, const char *format_string, ...); int hs_traceback(lua_State *L); int hs_call(lua_State *L); int hs_call_args(lua_State *L, ...); void hs_pushstring(lua_State *L, const char *format_string, ...); #define hs_rstore(L) luaL_ref(L, LUA_REGISTRYINDEX); #define hs_rload(L, ref) lua_rawgeti(L, LUA_REGISTRYINDEX, ref) #define hs_rdel(L, ref) luaL_unref(L, LUA_REGISTRYINDEX, ref) #endif