Software /
code /
prosody
Changeset
12590:5eaf77114fdb
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.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 11 Jul 2022 19:15:24 +0200 |
parents | 12589:39ae08180c81 |
children | 12591:494577d883ff |
files | core/moduleapi.lua tools/modtrace.lua util/format.lua util/iterators.lua util/openmetrics.lua |
diffstat | 5 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/core/moduleapi.lua Mon Jul 11 19:07:38 2022 +0200 +++ b/core/moduleapi.lua Mon Jul 11 19:15:24 2022 +0200 @@ -26,7 +26,7 @@ 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;
--- a/tools/modtrace.lua Mon Jul 11 19:07:38 2022 +0200 +++ b/tools/modtrace.lua Mon Jul 11 19:15:24 2022 +0200 @@ -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";
--- a/util/format.lua Mon Jul 11 19:07:38 2022 +0200 +++ b/util/format.lua Mon Jul 11 19:15:24 2022 +0200 @@ -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");
--- a/util/iterators.lua Mon Jul 11 19:07:38 2022 +0200 +++ b/util/iterators.lua Mon Jul 11 19:15:24 2022 +0200 @@ -13,7 +13,7 @@ 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;
--- a/util/openmetrics.lua Mon Jul 11 19:07:38 2022 +0200 +++ b/util/openmetrics.lua Mon Jul 11 19:15:24 2022 +0200 @@ -26,7 +26,7 @@ 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