Mercurial > prosody-hg
comparison core/moduleapi.lua @ 9686:e52e4e6e7ffb
moduleapi: Use pack from util.table
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sat, 08 Dec 2018 16:35:00 +0100 |
| parents | e4c09e335bd9 |
| children | 9ab9aabafa80 |
comparison
equal
deleted
inserted
replaced
| 9685:e98b901446d0 | 9686:e52e4e6e7ffb |
|---|---|
| 18 local t_insert, t_remove, t_concat = table.insert, table.remove, table.concat; | 18 local t_insert, t_remove, t_concat = table.insert, table.remove, table.concat; |
| 19 local error, setmetatable, type = error, setmetatable, type; | 19 local error, setmetatable, type = error, setmetatable, type; |
| 20 local ipairs, pairs, select = ipairs, pairs, select; | 20 local ipairs, pairs, select = ipairs, pairs, select; |
| 21 local tonumber, tostring = tonumber, tostring; | 21 local tonumber, tostring = tonumber, tostring; |
| 22 local require = require; | 22 local require = require; |
| 23 local pack = table.pack or function(...) return {n=select("#",...), ...}; end -- table.pack is only in 5.2 | 23 local pack = table.pack or require "util.table".pack; -- table.pack is only in 5.2 |
| 24 local unpack = table.unpack or unpack; --luacheck: ignore 113 -- renamed in 5.2 | 24 local unpack = table.unpack or unpack; --luacheck: ignore 113 -- renamed in 5.2 |
| 25 | 25 |
| 26 local prosody = prosody; | 26 local prosody = prosody; |
| 27 local hosts = prosody.hosts; | 27 local hosts = prosody.hosts; |
| 28 | 28 |
