Comparison

plugins/mod_storage_sql.lua @ 9691:e11e076f0eb8

various: Don't rely on _G.unpack existing
author Kim Alvefur <zash@zash.se>
date Sat, 08 Dec 2018 17:09:55 +0100
parent 9628:2fcf517b811e
child 9883:f76bd399267c
comparison
equal deleted inserted replaced
9690:75ed3403065d 9691:e11e076f0eb8
9 9
10 local is_stanza = require"util.stanza".is_stanza; 10 local is_stanza = require"util.stanza".is_stanza;
11 local t_concat = table.concat; 11 local t_concat = table.concat;
12 12
13 local noop = function() end 13 local noop = function() end
14 local unpack = table.unpack or unpack; 14 local unpack = table.unpack or unpack; -- luacheck: ignore 113
15 local function iterator(result) 15 local function iterator(result)
16 return function(result_) 16 return function(result_)
17 local row = result_(); 17 local row = result_();
18 if row ~= nil then 18 if row ~= nil then
19 return unpack(row); 19 return unpack(row);