1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
#ifndef HONEYSUCKLE_H
#define HONEYSUCKLE_H
#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>
#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, ...);
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
|