Diff

util/events.lua @ 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
parent 6641:b44ebfe81c73
child 6665:e923d7cb8430
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