[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua 5.2 & SWIG compatibility problem
- From: Roberto Ierusalimschy <roberto@...>
- Date: Thu, 29 Dec 2011 14:50:19 -0200
> Hi Just a heads up as I havent seen any previous mention of this problem on the mailing list before. I started updating my project to switch from 5.1 to 5.2 but hit a pretty awkward showstopper problem. I use SWIG extensively to generate auto bindings. The SWIG auto generated code uses LUA_GLOBALSINDEX which no longer exists in 5.2. I found a recent Swig user post discussing the problem http://old.nabble.com/Lua-5.2-alpha-compatibility-td30299686.html It would be good if someone from the Lua team could confirm the best fix for this issue is to replace the LUA_GLOBALS_INDEX line with /* push the global table onto the stack */
> lua_getglobal(L,"_G") by "best" I mean a fix that works for both 5.1 & 5.2.
I do not know Swig, so I cannot confirm whether the post suggestions are
"the best fix". But they seem sensible.