Comparison

plugins/mod_storage_sql.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 12574:18d33668c5fa
child 12595:0572b6e604a3
comparison
equal deleted inserted replaced
12588:b15d3cf98ba6 12589:39ae08180c81
11 11
12 local is_stanza = require"util.stanza".is_stanza; 12 local is_stanza = require"util.stanza".is_stanza;
13 local t_concat = table.concat; 13 local t_concat = table.concat;
14 14
15 local noop = function() end 15 local noop = function() end
16 local unpack = table.unpack or unpack; -- luacheck: ignore 113 16 local unpack = table.unpack;
17 local function iterator(result) 17 local function iterator(result)
18 return function(result_) 18 return function(result_)
19 local row = result_(); 19 local row = result_();
20 if row ~= nil then 20 if row ~= nil then
21 return unpack(row); 21 return unpack(row);