Menu

#309 Use lua_pushglobaltable for Lua

closed-accepted
None
5
2012-04-14
2012-04-13
Miles Bader
No

One of the Lua maintainers has recommended using "lua_pushglobaltable" to push the globals table, as being more future-proof than the method currently used by SWIG.

lua_pushglobaltable is new in Lua 5.2, so this patch:

(1) Adds a definition of lua_pushglobaltable for older versions of Lua to Lib/lua/luarun.swg

(2) Changes Lib/lua/luaruntime.swg to use it

With patch, the Lua test-suite results are unchanged for both Lua 5.1 and 5.2.

Discussion

  • Miles Bader

    Miles Bader - 2012-04-13

    Use lua_pushglobaltable for Lua

     
  • William Fulton

    William Fulton - 2012-04-14

    Okay, committed for swig-2.0.5

     
  • William Fulton

    William Fulton - 2012-04-14
    • assigned_to: nobody --> wsfulton
    • status: open --> closed-accepted
     

Log in to post a comment.