forked from xenith-studios/golua
-
Notifications
You must be signed in to change notification settings - Fork 0
/
golua.h
26 lines (22 loc) · 971 Bytes
/
golua.h
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
#include <stdint.h>
typedef struct { void *t; void *v; } GoInterface;
/* function to setup metatables, etc */
void clua_initstate(lua_State* L);
unsigned int clua_togofunction(lua_State* L, int index);
void clua_pushgofunction(lua_State* L, unsigned int fid);
void clua_pushlightinteger(lua_State* L, int n);
uintptr_t clua_tolightinteger(lua_State* L, int index);
void clua_setgostate(lua_State* L, GoInterface gostate);
GoInterface* clua_getgostate(lua_State* L);
GoInterface clua_atpanic(lua_State* L, unsigned int panicf_id);
int clua_callluacfunc(lua_State* L, lua_CFunction f);
lua_State* clua_newstate(void* goallocf);
void clua_setallocf(lua_State* L, void* goallocf);
void clua_openbase(lua_State* L);
void clua_openio(lua_State* L);
void clua_openmath(lua_State* L);
void clua_openpackage(lua_State* L);
void clua_openstring(lua_State* L);
void clua_opentable(lua_State* L);
void clua_openos(lua_State* L);
void clua_setexecutionlimit(lua_State* L, int n);