Software /
code /
prosody
Comparison
core/moduleapi.lua @ 12589:39ae08180c81
compat: Remove handling of Lua 5.1 location of 'unpack' function
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 11 Jul 2022 19:07:38 +0200 |
parent | 12479:4d36fbcdd210 |
child | 12590:5eaf77114fdb |
comparison
equal
deleted
inserted
replaced
12588:b15d3cf98ba6 | 12589:39ae08180c81 |
---|---|
25 local error, setmetatable, type = error, setmetatable, type; | 25 local error, setmetatable, type = error, setmetatable, type; |
26 local ipairs, pairs, select = ipairs, pairs, select; | 26 local ipairs, pairs, select = ipairs, pairs, select; |
27 local tonumber, tostring = tonumber, tostring; | 27 local tonumber, tostring = tonumber, tostring; |
28 local require = require; | 28 local require = require; |
29 local pack = table.pack or require "util.table".pack; -- table.pack is only in 5.2 | 29 local pack = table.pack or require "util.table".pack; -- table.pack is only in 5.2 |
30 local unpack = table.unpack or unpack; --luacheck: ignore 113 -- renamed in 5.2 | 30 local unpack = table.unpack; |
31 | 31 |
32 local prosody = prosody; | 32 local prosody = prosody; |
33 local hosts = prosody.hosts; | 33 local hosts = prosody.hosts; |
34 | 34 |
35 -- FIXME: This assert() is to try and catch an obscure bug (2013-04-05) | 35 -- FIXME: This assert() is to try and catch an obscure bug (2013-04-05) |