loggingmanager,modulemanager,moduleapi: Localize unpack compatible with Lua 5.2+
authorKim Alvefur <zash@zash.se>
Thu, 18 Feb 2016 13:57:04 +0000 (14:57 +0100)
committerKim Alvefur <zash@zash.se>
Thu, 18 Feb 2016 13:57:04 +0000 (14:57 +0100)
core/moduleapi.lua
core/modulemanager.lua

index 573f3153e648e96d418843606257a291dd591d44..9a0c5223b466af0f45fd30f535aa6c5aed66048c 100644 (file)
@@ -19,7 +19,8 @@ local st = require "util.stanza";
 
 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;
 
index 41c9b2fe97eacebb02a8322aee0728c4a2674386..5d030513f0ac6f08dc6246f62918f471b03b4b4c 100644 (file)
@@ -23,7 +23,8 @@ local setmetatable, rawget = setmetatable, rawget;
 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 = {...};