#73 geanylua: Fix build with lua 5.2

geanylua (8)

In order to build geanulya with lua 5.2, some minor patching is needed. The patch remains compatible with lua 5.1


  • Nick Treleaven

    Nick Treleaven - 2012-01-20

    I tried downloading the patch but unfortunately I get some sourceforge HTML data instead.

  • Colomban Wendling

    • labels: --> geanylua
  • Colomban Wendling

    The patch makes geanylua build with liblua5.2 (5.2.0), but it then breaks with liblua5.1 (5.1.5). Errors are:

    1) lua_rawlen() seems new in 5.2. looking at the headers, using lua_objlen() as before is fine, lua 5.2 seems to have a compatibility layer for that.

    2) lua_pushglobaltable() doesn't exist in 5.1, but indeed LUA_GLOBALSINDEX is gone in 5.2.

    Also I have no clue about Lua so I can't tell whether a change like:

    - lua_getfield(L, LUA_GLOBALSINDEX, "debug");
    + lua_pushglobaltable(L);
    + lua_getfield(L,-1,"debug");
    + lua_remove(L,-2);

    is legitimate or not in the first place (I don't doubt it is, it just doesn't look that intuitive). Is anybody around that could confirm that?


Log in to post a comment.