Changeset

7162:d0b64f1e4f5d

loggingmanager,modulemanager,moduleapi: Localize unpack compatible with Lua 5.2+
author Kim Alvefur <zash@zash.se>
date Thu, 18 Feb 2016 14:57:04 +0100
parents 7160:5c1ee8c06235
children 7163:eadbf19d0de0
files core/moduleapi.lua core/modulemanager.lua
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/core/moduleapi.lua	Thu Feb 18 13:48:45 2016 +0000
+++ b/core/moduleapi.lua	Thu Feb 18 14:57:04 2016 +0100
@@ -19,7 +19,8 @@
 
 local t_insert, t_remove, t_concat = table.insert, table.remove, table.concat;
 local error, setmetatable, type = error, setmetatable, type;
-local ipairs, pairs, select, unpack = ipairs, pairs, select, unpack;
+local ipairs, pairs, select = ipairs, pairs, select;
+local unpack = table.unpack or unpack;
 local tonumber, tostring = tonumber, tostring;
 local require = require;
 
--- a/core/modulemanager.lua	Thu Feb 18 13:48:45 2016 +0000
+++ b/core/modulemanager.lua	Thu Feb 18 14:57:04 2016 +0100
@@ -23,7 +23,8 @@
 local ipairs, pairs, type, tostring, t_insert = ipairs, pairs, type, tostring, table.insert;
 
 local debug_traceback = debug.traceback;
-local unpack, select = unpack, select;
+local select = select;
+local unpack = table.unpack or unpack;
 local pcall = function(f, ...)
 	local n = select("#", ...);
 	local params = {...};