diff options
author | torque <torque@1> | 2015-03-06 03:20:57 -0800 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-03-06 12:28:20 +0100 |
commit | 4ff29f33b0d86888a02524df5d6085c4bc29477e (patch) | |
tree | b974a76983e69f6ae9fdb1e17d3ad7baa04a2f22 /player/lua | |
parent | fc571e0adb2498cc9278ee51f9aa6b00ee165644 (diff) |
Lua: add unpack shim for Lua 5.2/5.3 compatibility.
The global unpack function got moved to table.unpack in Lua 5.2, and
it's only available as the global if 5.2 is built with compatibility
enabled (the default). Lua 5.3 does not build with 5.1 compatibility by
default.
Fixes #1648.
Diffstat (limited to 'player/lua')
-rw-r--r-- | player/lua/defaults.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/player/lua/defaults.lua b/player/lua/defaults.lua index 4cdeef497f..3a55e3a206 100644 --- a/player/lua/defaults.lua +++ b/player/lua/defaults.lua @@ -1,3 +1,5 @@ +-- Compatibility shim for lua 5.2/5.3 +unpack = unpack or table.unpack -- these are used internally by lua.c mp.UNKNOWN_TYPE.info = "this value is inserted if the C type is not supported" |