# HG changeset patch # User Kim Alvefur # Date 1455803824 -3600 # Node ID d0b64f1e4f5d5a3f4af49b1b9b3e47402459504a # Parent 5c1ee8c0623565211e31aafbb51b8f25a6ac610b loggingmanager,modulemanager,moduleapi: Localize unpack compatible with Lua 5.2+ diff -r 5c1ee8c06235 -r d0b64f1e4f5d core/moduleapi.lua --- 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; diff -r 5c1ee8c06235 -r d0b64f1e4f5d core/modulemanager.lua --- 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 = {...};