Comparison

core/moduleapi.lua @ 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
parent 7127:27557dd7b460
child 7163:eadbf19d0de0
comparison
equal deleted inserted replaced
7160:5c1ee8c06235 7162:d0b64f1e4f5d
17 local measure = require "core.statsmanager".measure; 17 local measure = require "core.statsmanager".measure;
18 local st = require "util.stanza"; 18 local st = require "util.stanza";
19 19
20 local t_insert, t_remove, t_concat = table.insert, table.remove, table.concat; 20 local t_insert, t_remove, t_concat = table.insert, table.remove, table.concat;
21 local error, setmetatable, type = error, setmetatable, type; 21 local error, setmetatable, type = error, setmetatable, type;
22 local ipairs, pairs, select, unpack = ipairs, pairs, select, unpack; 22 local ipairs, pairs, select = ipairs, pairs, select;
23 local unpack = table.unpack or unpack;
23 local tonumber, tostring = tonumber, tostring; 24 local tonumber, tostring = tonumber, tostring;
24 local require = require; 25 local require = require;
25 26
26 local prosody = prosody; 27 local prosody = prosody;
27 local hosts = prosody.hosts; 28 local hosts = prosody.hosts;