From f0eb4a34776fa30d0033a5f89aa7d7de5525ff7e Mon Sep 17 00:00:00 2001 From: Brenden Matthews Date: Sat, 22 Dec 2018 15:27:08 -0500 Subject: [PATCH] Squashed '3rdparty/toluapp/' changes from 1fae7fd2..db877c5d db877c5d Code generation fixes. (#4) git-subtree-dir: 3rdparty/toluapp git-subtree-split: db877c5dd1c2750cb5521b2bd82528ba500b3666 --- .gitignore | 1 + src/bin/lua/package.lua | 2 +- src/lib/tolua_to.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..567609b1 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +build/ diff --git a/src/bin/lua/package.lua b/src/bin/lua/package.lua index 18d0e560..0183f5cf 100644 --- a/src/bin/lua/package.lua +++ b/src/bin/lua/package.lua @@ -189,7 +189,7 @@ function classPackage:register (pre) output("#if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 501\n"); output(pre.."TOLUA_API int luaopen_"..self.name.." (lua_State* tolua_S) {") output(pre.." return tolua_"..self.name.."_open(tolua_S);") - output(pre.."};") + output(pre.."}") output("#endif\n\n") pop() diff --git a/src/lib/tolua_to.c b/src/lib/tolua_to.c index 97b90388..fed34d10 100644 --- a/src/lib/tolua_to.c +++ b/src/lib/tolua_to.c @@ -127,8 +127,8 @@ TOLUA_API int tolua_tofieldvalue(lua_State *L, int lo, int index, int def) TOLUA_API int tolua_getfieldboolean(lua_State *L, int lo, int index, int def) { - (void)def; int v; + (void)def; lua_pushnumber(L, index); lua_gettable(L, lo); v = lua_isnil(L, -1) ? 0 : lua_toboolean(L, -1);