-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot build wxLua for Lua 5.2 #54
Comments
@sheetcam, what's the actual error you are getting? There is no I think the following patch should work with both Lua 5.2 and Lua 5.3: diff --git a/wxLua/modules/wxlua/bit.c b/wxLua/modules/wxlua/bit.c
index 1c37f86..377d544 100644
--- a/wxLua/modules/wxlua/bit.c
+++ b/wxLua/modules/wxlua/bit.c
@@ -177,7 +177,8 @@ static int libsize (const luaL_Reg *l) {
static void pushmodule (lua_State *L, const char *modname, int sizehint) {
lua_pushglobaltable(L);
lua_pushstring(L, modname);
- if (lua_rawget(L, -2) != LUA_TNIL) { /* no such field? */
+ lua_rawget(L, -2);
+ if (!lua_isnil(L, -1)) {
luaL_error(L, "name conflict for module '%s'", modname);
}
lua_pop(L, 1); /* remove this nil */ Can you apply it and let me know? |
I just built wxWidgets 3.1.3 with 2.8 compatibility enabled then used the cmake defaults apart from setting the Lua version to 5.2 and the build type to MinSizeRel. |
@sheetcam, sounds good. I pushed the changes, but let me know if you run into any issues. |
If you try to build for Lua5.2 the build fails in bit.c, line 180. It expects a return value from lua_rawget but lua_rawget does not return a value in 5.2. This appears to only be available in 5.3+
I have attached a diff to fix the issue (bit.c.txt):
The text was updated successfully, but these errors were encountered: