Mercurial > prosody-hg
comparison core/modulemanager.lua @ 7163:eadbf19d0de0
loggingmanager,modulemanager,moduleapi: Ignore warning about accessing _G.unpack [luacheck]
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Thu, 18 Feb 2016 14:57:51 +0100 |
| parents | d0b64f1e4f5d |
| children | 439d00063620 |
comparison
equal
deleted
inserted
replaced
| 7162:d0b64f1e4f5d | 7163:eadbf19d0de0 |
|---|---|
| 22 local setmetatable, rawget = setmetatable, rawget; | 22 local setmetatable, rawget = setmetatable, rawget; |
| 23 local ipairs, pairs, type, tostring, t_insert = ipairs, pairs, type, tostring, table.insert; | 23 local ipairs, pairs, type, tostring, t_insert = ipairs, pairs, type, tostring, table.insert; |
| 24 | 24 |
| 25 local debug_traceback = debug.traceback; | 25 local debug_traceback = debug.traceback; |
| 26 local select = select; | 26 local select = select; |
| 27 local unpack = table.unpack or unpack; | 27 local unpack = table.unpack or unpack; --luacheck: ignore 113 |
| 28 local pcall = function(f, ...) | 28 local pcall = function(f, ...) |
| 29 local n = select("#", ...); | 29 local n = select("#", ...); |
| 30 local params = {...}; | 30 local params = {...}; |
| 31 return xpcall(function() return f(unpack(params, 1, n)) end, function(e) return tostring(e).."\n"..debug_traceback(); end); | 31 return xpcall(function() return f(unpack(params, 1, n)) end, function(e) return tostring(e).."\n"..debug_traceback(); end); |
| 32 end | 32 end |
