mirror of
https://github.com/bjc/prosody.git
synced 2025-04-01 20:27:39 +03:00
compat: Use table.pack (there since Lua 5.2) over our util.table
Added in d278a770eddc avoid having to deal with its absence in Lua 5.1. No longer needed when Lua 5.1 support is dropped.
This commit is contained in:
parent
5251c9b686
commit
f8e73eba98
5 changed files with 5 additions and 5 deletions
|
@ -26,7 +26,7 @@ local error, setmetatable, type = error, setmetatable, type;
|
|||
local ipairs, pairs, select = ipairs, pairs, select;
|
||||
local tonumber, tostring = tonumber, tostring;
|
||||
local require = require;
|
||||
local pack = table.pack or require "util.table".pack; -- table.pack is only in 5.2
|
||||
local pack = table.pack;
|
||||
local unpack = table.unpack;
|
||||
|
||||
local prosody = prosody;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
-- local dbuffer = require "tools.modtrace".trace("util.dbuffer");
|
||||
--
|
||||
|
||||
local t_pack = require "util.table".pack;
|
||||
local t_pack = table.pack;
|
||||
local serialize = require "util.serialization".serialize;
|
||||
local unpack = table.unpack;
|
||||
local set = require "util.set";
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
local tostring = tostring;
|
||||
local unpack = table.unpack;
|
||||
local pack = require "util.table".pack; -- TODO table.pack in 5.2+
|
||||
local pack = table.pack;
|
||||
local valid_utf8 = require "util.encodings".utf8.valid;
|
||||
local type = type;
|
||||
local dump = require "util.serialization".new("debug");
|
||||
|
|
|
@ -13,7 +13,7 @@ local it = {};
|
|||
local t_insert = table.insert;
|
||||
local next = next;
|
||||
local unpack = table.unpack;
|
||||
local pack = table.pack or require "util.table".pack;
|
||||
local pack = table.pack;
|
||||
local type = type;
|
||||
local table, setmetatable = table, setmetatable;
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ local log = require "util.logger".init("util.openmetrics");
|
|||
local new_multitable = require "util.multitable".new;
|
||||
local iter_multitable = require "util.multitable".iter;
|
||||
local t_concat, t_insert = table.concat, table.insert;
|
||||
local t_pack, t_unpack = require "util.table".pack, table.unpack;
|
||||
local t_pack, t_unpack = table.pack, table.unpack;
|
||||
|
||||
-- BEGIN of Utility: "metric proxy"
|
||||
-- This allows to wrap a MetricFamily in a proxy which only provides the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue