diff options
author | Vladimír Čunát <v@cunat.cz> | 2020-08-11 22:34:22 +0200 |
---|---|---|
committer | Vladimír Čunát <v@cunat.cz> | 2020-08-11 22:34:22 +0200 |
commit | 48618a1ab334597b3c29074d1131ffd8ac0ce64b (patch) | |
tree | 25f908c3c5c064c6f60af899e2254d5d057abe9e /pkgs/development/lua-modules | |
parent | b6ec74c332bf74f52d5e2c2a3d1fdfb0f2339523 (diff) | |
parent | 7c365103d7c51a72ab03bd2526eae56efd718661 (diff) |
Merge #94790: luajit*: bugfix updates
Diffstat (limited to 'pkgs/development/lua-modules')
-rw-r--r-- | pkgs/development/lua-modules/luaexpat.patch | 36 | ||||
-rw-r--r-- | pkgs/development/lua-modules/overrides.nix | 3 |
2 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/development/lua-modules/luaexpat.patch b/pkgs/development/lua-modules/luaexpat.patch new file mode 100644 index 000000000000..3dd609108426 --- /dev/null +++ b/pkgs/development/lua-modules/luaexpat.patch @@ -0,0 +1,36 @@ +diff --git a/src/lxplib.c b/src/lxplib.c +index 1c972db..5712611 100644 +--- a/src/lxplib.c ++++ b/src/lxplib.c +@@ -590,7 +590,7 @@ static void set_info (lua_State *L) { + /* + ** Adapted from Lua 5.2.0 + */ +-static void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) { ++static void compat_luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) { + luaL_checkstack(L, nup, "too many upvalues"); + for (; l->name != NULL; l++) { /* fill the table with given functions */ + int i; +@@ -602,6 +602,8 @@ static void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) { + } + lua_pop(L, nup); /* remove upvalues */ + } ++#else ++#define compat_luaL_setfuncs(L, reg, nup) luaL_setfuncs(L, reg, nup) + #endif + + +@@ -612,11 +614,11 @@ int luaopen_lxp (lua_State *L) { + lua_pushvalue(L, -2); + lua_rawset(L, -3); + +- luaL_setfuncs (L, lxp_meths, 0); ++ compat_luaL_setfuncs (L, lxp_meths, 0); + lua_pop (L, 1); /* remove metatable */ + + lua_newtable (L); +- luaL_setfuncs (L, lxp_funcs, 0); ++ compat_luaL_setfuncs (L, lxp_funcs, 0); + set_info (L); + return 1; + } diff --git a/pkgs/development/lua-modules/overrides.nix b/pkgs/development/lua-modules/overrides.nix index c1d7dfc9b26e..6416d59a71e2 100644 --- a/pkgs/development/lua-modules/overrides.nix +++ b/pkgs/development/lua-modules/overrides.nix @@ -204,6 +204,9 @@ with super; externalDeps = [ { name = "EXPAT"; dep = pkgs.expat; } ]; + patches = [ + ./luaexpat.patch + ]; }); # TODO Somehow automatically amend buildInputs for things that need luaffi |