util.events: Add local reference to table.remove (fixes traceback)
authorKim Alvefur <zash@zash.se>
Mon, 4 May 2015 22:41:39 +0000 (00:41 +0200)
committerKim Alvefur <zash@zash.se>
Mon, 4 May 2015 22:41:39 +0000 (00:41 +0200)
util/events.lua

index 79de1151741a3e6f2dd0220e9ab4a0b1ebceafc9..81fbc13fc127e285c96f78b1d4d2d9d418c8891e 100644 (file)
@@ -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