Phrogz / SLAXML

SAX-like streaming XML parser for Lua

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

unpack error

NauticalMile64 opened this issue · comments

Lines 168, 170, 174 raise errors when run with Lua 5.2:

lua: .\slaxml.lua:168: attempt to call global 'unpack' (a nil value)

unpack has been moved into the table table in Lua 5.2.

Inserting the following line at line 38 solved the issue, and should make the file compatible with both Lua 5.1 and 5.2:
local unpack = unpack or table.unpack

Fixed in release 0.5.2, by commit 2a9bfbc