Comparison

core/modulemanager.lua @ 7164:af26e8eb591f

Merge 0.10->trunk
author Kim Alvefur <zash@zash.se>
date Thu, 18 Feb 2016 15:00:17 +0100
parent 7163:eadbf19d0de0
child 7303:439d00063620
comparison
equal deleted inserted replaced
7161:8380b595a33b 7164:af26e8eb591f
21 local xpcall = xpcall; 21 local xpcall = xpcall;
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 unpack, select = unpack, select; 26 local select = select;
27 local unpack = table.unpack or unpack; --luacheck: ignore 113
27 local pcall = function(f, ...) 28 local pcall = function(f, ...)
28 local n = select("#", ...); 29 local n = select("#", ...);
29 local params = {...}; 30 local params = {...};
30 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);
31 end 32 end