Changeset

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
parents 9690:75ed3403065d
children 9692:affcbccc1dff
files net/resolvers/basic.lua net/resolvers/manual.lua net/resolvers/service.lua net/websocket/frames.lua plugins/mod_admin_telnet.lua plugins/mod_pep_simple.lua plugins/mod_storage_sql.lua spec/core_storagemanager_spec.lua
diffstat 8 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/net/resolvers/basic.lua	Sat Dec 08 17:07:28 2018 +0100
+++ b/net/resolvers/basic.lua	Sat Dec 08 17:09:55 2018 +0100
@@ -1,5 +1,6 @@
 local adns = require "net.adns";
 local inet_pton = require "util.net".pton;
+local unpack = table.unpack or unpack; -- luacheck: ignore 113
 
 local methods = {};
 local resolver_mt = { __index = methods };
--- a/net/resolvers/manual.lua	Sat Dec 08 17:07:28 2018 +0100
+++ b/net/resolvers/manual.lua	Sat Dec 08 17:09:55 2018 +0100
@@ -1,5 +1,6 @@
 local methods = {};
 local resolver_mt = { __index = methods };
+local unpack = table.unpack or unpack; -- luacheck: ignore 113
 
 -- Find the next target to connect to, and
 -- pass it to cb()
--- a/net/resolvers/service.lua	Sat Dec 08 17:07:28 2018 +0100
+++ b/net/resolvers/service.lua	Sat Dec 08 17:09:55 2018 +0100
@@ -1,5 +1,6 @@
 local adns = require "net.adns";
 local basic = require "net.resolvers.basic";
+local unpack = table.unpack or unpack; -- luacheck: ignore 113
 
 local methods = {};
 local resolver_mt = { __index = methods };
--- a/net/websocket/frames.lua	Sat Dec 08 17:07:28 2018 +0100
+++ b/net/websocket/frames.lua	Sat Dec 08 17:09:55 2018 +0100
@@ -16,6 +16,7 @@
 local bxor = bit.bxor;
 local lshift = bit.lshift;
 local rshift = bit.rshift;
+local unpack = table.unpack or unpack; -- luacheck: ignore 113
 
 local t_concat = table.concat;
 local s_byte = string.byte;
--- a/plugins/mod_admin_telnet.lua	Sat Dec 08 17:07:28 2018 +0100
+++ b/plugins/mod_admin_telnet.lua	Sat Dec 08 17:09:55 2018 +0100
@@ -22,6 +22,7 @@
 
 local console_listener = { default_port = 5582; default_mode = "*a"; interface = "127.0.0.1" };
 
+local unpack = table.unpack or unpack; -- luacheck: ignore 113
 local iterators = require "util.iterators";
 local keys, values = iterators.keys, iterators.values;
 local jid_bare, jid_split, jid_join = import("util.jid", "bare", "prepped_split", "join");
--- a/plugins/mod_pep_simple.lua	Sat Dec 08 17:07:28 2018 +0100
+++ b/plugins/mod_pep_simple.lua	Sat Dec 08 17:09:55 2018 +0100
@@ -14,6 +14,7 @@
 local pairs = pairs;
 local next = next;
 local type = type;
+local unpack = table.unpack or unpack; -- luacheck: ignore 113
 local calculate_hash = require "util.caps".calculate_hash;
 local core_post_stanza = prosody.core_post_stanza;
 local bare_sessions = prosody.bare_sessions;
--- a/plugins/mod_storage_sql.lua	Sat Dec 08 17:07:28 2018 +0100
+++ b/plugins/mod_storage_sql.lua	Sat Dec 08 17:09:55 2018 +0100
@@ -11,7 +11,7 @@
 local t_concat = table.concat;
 
 local noop = function() end
-local unpack = table.unpack or unpack;
+local unpack = table.unpack or unpack; -- luacheck: ignore 113
 local function iterator(result)
 	return function(result_)
 		local row = result_();
--- a/spec/core_storagemanager_spec.lua	Sat Dec 08 17:07:28 2018 +0100
+++ b/spec/core_storagemanager_spec.lua	Sat Dec 08 17:09:55 2018 +0100
@@ -1,4 +1,4 @@
-local unpack = table.unpack or unpack;
+local unpack = table.unpack or unpack; -- luacheck: ignore 113
 local server = require "net.server_select";
 package.loaded["net.server"] = server;