Changeset

6648:999434eb1bbf

util.events: Add local reference to table.remove (fixes traceback)
author Kim Alvefur <zash@zash.se>
date Tue, 05 May 2015 00:41:39 +0200
parents 6646:9795b8cf14f1
children 6649:99fa40d498cc
files util/events.lua
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/util/events.lua	Sun May 03 18:38:39 2015 +0200
+++ b/util/events.lua	Tue May 05 00:41:39 2015 +0200
@@ -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 @@
 		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