diff options
author | bloodstalker <thabogre@gmail.com> | 2018-09-10 14:01:59 +0000 |
---|---|---|
committer | bloodstalker <thabogre@gmail.com> | 2018-09-10 14:01:59 +0000 |
commit | 69360b15987798dfbffbc4c5688d1a8108945ff1 (patch) | |
tree | 8b69055cf9ca8b90c1cc47be9f63ac4a82d54d07 /bruiser/asmrewriter.c | |
parent | jmp_t_s now uses the new way of registering tables, the 5.3 way. bruiser is s... (diff) | |
download | mutator-69360b15987798dfbffbc4c5688d1a8108945ff1.tar.gz mutator-69360b15987798dfbffbc4c5688d1a8108945ff1.zip |
begenning to integrate and test both the codegens. run git pull for faultreiber and tablegen.
Diffstat (limited to 'bruiser/asmrewriter.c')
-rw-r--r-- | bruiser/asmrewriter.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bruiser/asmrewriter.c b/bruiser/asmrewriter.c index 12d358a..f5743c1 100644 --- a/bruiser/asmrewriter.c +++ b/bruiser/asmrewriter.c @@ -298,6 +298,7 @@ static const luaL_Reg jmpt_meta[] = { }; int jmpt_register(lua_State* __ls) { + lua_checkstack(__ls, 4); lua_newtable(__ls); luaL_setfuncs(__ls, jmpt_methods, 0); luaL_newmetatable(__ls, "jmp_s_t"); @@ -308,7 +309,8 @@ int jmpt_register(lua_State* __ls) { lua_pushliteral(__ls, "__metatable"); lua_pushvalue(__ls, -3); lua_rawset(__ls, -3); - return 1; + lua_setglobal(__ls, "jmp_s_t"); + return 0; #if 0 luaL_openlib(__ls, "jmp_s_t", jmpt_methods, 0); luaL_newmetatable(__ls, "jmp_s_t"); |