main/lua-luaxml: Fix bug on Lua 5.2+
In earlier versions of Lua, registering a C library would automatically create a global variable and store the library's table in it. In recent versions of Lua, that is not the case. However, LuaXml relied on its table being accessible in a global variable called "xml". If this global variable was not defined, several functions would break, including 'load' and 'eval'. If the XML received as input contained any nodes at all, these functions would fail with an error stating: "attempt to index a nil value". The reason why LuaXml wanted to access its own table of functions was to use those functions in the metatable for each parsed XML node. Instead of that, we can set up one shared metatable and stash it in the registry. Also, remove liblua from LIBS, since Lua modules should not link directly to liblua. (Ref: https://lua-users.org/wiki/BuildingModules)
parent
0432b2d7
No related branches found
No related tags found
Showing
- main/lua-luaxml/0001-Fix-error-where-TAG-should-be-xml.TAG.patch 0 additions, 44 deletions...a-luaxml/0001-Fix-error-where-TAG-should-be-xml.TAG.patch
- main/lua-luaxml/APKBUILD 13 additions, 7 deletionsmain/lua-luaxml/APKBUILD
- main/lua-luaxml/fixes.patch 75 additions, 0 deletionsmain/lua-luaxml/fixes.patch
Loading
-
mentioned in commit 9ee8e512
-
mentioned in merge request !30331 (merged)
Please register or sign in to comment