aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2015-05-05 00:41:39 +0200
committerKim Alvefur <zash@zash.se>2015-05-05 00:41:39 +0200
commit79d62137f4f324cd4b8f7c2ecd9c2654193cf5a0 (patch)
treebd5767ea67ee7b0f3dcc5a367996f103a2335e2a /util
parentf303d3dda826ebe6df8bc8a4534ee674291a4795 (diff)
downloadprosody-79d62137f4f324cd4b8f7c2ecd9c2654193cf5a0.tar.gz
prosody-79d62137f4f324cd4b8f7c2ecd9c2654193cf5a0.zip
util.events: Add local reference to table.remove (fixes traceback)
Diffstat (limited to 'util')
-rw-r--r--util/events.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/util/events.lua b/util/events.lua
index 79de1151..81fbc13f 100644
--- a/util/events.lua
+++ b/util/events.lua
@@ -9,6 +9,7 @@
local pairs = pairs;
local t_insert = table.insert;
+local t_remove = table.remove;
local t_sort = table.sort;
local setmetatable = setmetatable;
local next = next;
@@ -118,7 +119,7 @@ function new()
if not w then return; end
for i = #w, 1 do
if w[i] == wrapper then
- table.remove(w, i);
+ t_remove(w, i);
end
end
if #w == 0 then