From c0b9f25bebcecd1b5b42ce9248594f05f82b9fc0 Mon Sep 17 00:00:00 2001 From: bloodstalker Date: Sun, 10 Jun 2018 06:25:52 +0430 Subject: added the autogen files, should also fix travis --- bruiser/luatablegen/W_Start_Section_tablegen.c | 97 ++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 bruiser/luatablegen/W_Start_Section_tablegen.c (limited to 'bruiser/luatablegen/W_Start_Section_tablegen.c') diff --git a/bruiser/luatablegen/W_Start_Section_tablegen.c b/bruiser/luatablegen/W_Start_Section_tablegen.c new file mode 100644 index 0000000..1f46d8a --- /dev/null +++ b/bruiser/luatablegen/W_Start_Section_tablegen.c @@ -0,0 +1,97 @@ + +// automatically generated by luatablegen +#include "../lua-5.3.4/src/lua.h" +#include "../lua-5.3.4/src/lauxlib.h" +#include "../lua-5.3.4/src/lualib.h" +#include +#include +#ifndef _W_Start_Section_H +#define _W_Start_Section_H +#ifdef __cplusplus +extern "C" { +#endif +#include "./W_Start_Section_tablegen.h" + +#include "../wasm.h" + +static W_Start_Section* convert_W_Start_Section (lua_State* __ls, int index) { + W_Start_Section* dummy = (W_Start_Section*)lua_touserdata(__ls, index); + if (dummy == NULL) printf("W_Start_Section:bad user data type.\n"); + return dummy; +} + +static W_Start_Section* check_W_Start_Section(lua_State* __ls, int index) { + W_Start_Section* dummy; + luaL_checktype(__ls, index, LUA_TUSERDATA); + dummy = (W_Start_Section*)luaL_checkudata(__ls, index, "W_Start_Section"); + if (dummy == NULL) printf("W_Start_Section:bad user data type.\n"); + return dummy; +} + +W_Start_Section* push_W_Start_Section(lua_State* __ls) { + lua_checkstack(__ls, 1); + W_Start_Section* dummy = lua_newuserdata(__ls, sizeof(W_Start_Section)); + luaL_getmetatable(__ls, "W_Start_Section"); + lua_setmetatable(__ls, -2); + return dummy; +} + +int W_Start_Section_push_args(lua_State* __ls, W_Start_Section* _st) { + lua_checkstack(__ls, 1); + lua_pushinteger(__ls, _st->index); + return 0; +} + +int new_W_Start_Section(lua_State* __ls) { + lua_checkstack(__ls, 1); + varuint32 index = luaL_optinteger(__ls,-1,0); + W_Start_Section* dummy = push_W_Start_Section(__ls); + dummy->index = index; + return 1; +} + +static int getter_W_Start_Section_index(lua_State* __ls) { + W_Start_Section* dummy = check_W_Start_Section(__ls, 1); + lua_pop(__ls, -1); + lua_pushinteger(__ls, dummy->index); + return 1; +} + +static int setter_W_Start_Section_index(lua_State* __ls) { + W_Start_Section* dummy = check_W_Start_Section(__ls, 1); + dummy->index = luaL_checkinteger(__ls, 2); + lua_settop(__ls, 1); + return 1; +} + +static const luaL_Reg W_Start_Section_methods[] = { + {"new", new_W_Start_Section}, + {"set_index", setter_W_Start_Section_index}, + {"index", getter_W_Start_Section_index}, + {0,0} +}; + +static const luaL_Reg W_Start_Section_meta[] = { + {0, 0} +}; + +int W_Start_Section_register(lua_State* __ls) { + luaL_openlib(__ls, "W_Start_Section", W_Start_Section_methods, 0); + luaL_newmetatable(__ls, "W_Start_Section"); + luaL_openlib(__ls, 0, W_Start_Section_meta, 0); + lua_pushliteral(__ls, "__index"); + lua_pushvalue(__ls, -3); + lua_rawset(__ls, -3); + lua_pushliteral(__ls, "__metatable"); + lua_pushvalue(__ls, -3); + lua_rawset(__ls, -3); + lua_pop(__ls, 1); +return 1; +} + +#ifdef __cplusplus +} +#endif //end of extern c +#endif //end of inclusion guard + + -- cgit v1.2.3