aports/main/lua-luaxml
Alex Dowad 77f0be5149 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)
2022-02-01 13:59:27 +02:00
..