aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-12-08 16:35:39 +0100
committerKim Alvefur <zash@zash.se>2018-12-08 16:35:39 +0100
commit755f1d8050c373af7abf578ac30067f1d141c93f (patch)
tree9281a9058cce0690a9d5abca724756f512ca26c8 /util
parent9ca48298d7444c3fa207487419e06c76716cb795 (diff)
downloadprosody-755f1d8050c373af7abf578ac30067f1d141c93f.tar.gz
prosody-755f1d8050c373af7abf578ac30067f1d141c93f.zip
util.format: Use pack from util.table
Diffstat (limited to 'util')
-rw-r--r--util/format.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/util/format.lua b/util/format.lua
index 16c57bc6..6c46384a 100644
--- a/util/format.lua
+++ b/util/format.lua
@@ -3,12 +3,13 @@
--
local tostring = tostring;
-local select = select;
local unpack = table.unpack or unpack; -- luacheck: ignore 113/unpack
+local pack = require "util.table".pack; -- TODO table.pack in 5.2+
local type = type;
local function format(formatstring, ...)
- local args, args_length = { ... }, select('#', ...);
+ local args = pack(...);
+ local args_length = args.n;
-- format specifier spec:
-- 1. Start: '%%'