From f8334e283c5eb0efeb4bb8a134041e18388d5f01 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 21 Apr 2017 16:57:00 +0200 Subject: Lua init --- src/sysbin/lx/lxlib.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/sysbin/lx/lxlib.h') diff --git a/src/sysbin/lx/lxlib.h b/src/sysbin/lx/lxlib.h index 199c78d..260db97 100644 --- a/src/sysbin/lx/lxlib.h +++ b/src/sysbin/lx/lxlib.h @@ -6,12 +6,18 @@ #include -#define LX_SYSLIBNAME "lx.sys" -LUAMOD_API int (lx_open_sys) (lua_State *L); +// Helper for libraries +bool lx_checkboolean(lua_State *L, int arg); +void setintfield (lua_State *L, const char *key, int value); +void setstrfield (lua_State *L, const char *key, const char* value); + #define LX_SYSLIBNAME "lx.sys" LUAMOD_API int (lx_open_sys) (lua_State *L); +#define LX_IOCTLLIBNAME "lx.ioctl" +LUAMOD_API int (lx_open_ioctl) (lua_State *L); + #define LX_MSGLIBNAME "lx.msg" LUAMOD_API int (luaopen_cmsgpack) (lua_State *L); #define lx_open_msg luaopen_cmsgpack -- cgit v1.2.3