aboutsummaryrefslogtreecommitdiffstats
path: root/main/lua-microlight/fix-lua-5.3.patch
blob: 8ec4203f1d40261cd3b98cc95468d72885d0ab7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From f28d838c92de332764882055035dac72c3a143bf Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Mon, 6 Apr 2015 20:11:35 +0000
Subject: [PATCH] Issue #7: fix for Lua 5.3

---
 ml.lua | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ml.lua b/ml.lua
index 6915195..3dbec40 100644
--- a/ml.lua
+++ b/ml.lua
@@ -8,6 +8,8 @@ local ml = {}
 local select,pairs = select,pairs
 local function_arg
 
+table.unpack = table.unpack or unpack
+
 ---------------------------------------------------
 -- String utilties.
 -- @section string
@@ -585,7 +587,7 @@ function ml.import(t,...)
             libs[i] = lib
         end
     end
-    return ml.update(t,unpack(libs))
+    return ml.update(t,table.unpack(libs))
 end
 
 --- add the key/value pairs of arrays to the first array.