diff options
author | torque <torque@1> | 2015-03-06 03:20:57 -0800 |
---|---|---|
committer | Diogo Franco (Kovensky) <diogomfranco@gmail.com> | 2015-03-11 12:33:53 +0900 |
commit | 80669188d6460e4e72af14144a84a359a7dc798d (patch) | |
tree | 26b5ab423ac280f493a9dd44acdb6e9705bf5739 | |
parent | 1a3a3aba63d079f5364ff8926e9d621a3c58a3f9 (diff) | |
download | mpv-80669188d6460e4e72af14144a84a359a7dc798d.tar.bz2 mpv-80669188d6460e4e72af14144a84a359a7dc798d.tar.xz |
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.
(cherry picked from commit 4ff29f33b0d86888a02524df5d6085c4bc29477e)
-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" |