Changeset

5817:6e087f3b8f3b

util.set: :items() now returns an iterator instead of the underlying table. This is much more efficient than 'for item in set' (which still works for now). Current access to _items is generally done directly, this may change.
author Matthew Wild <mwild1@gmail.com>
date Tue, 03 Sep 2013 12:21:43 +0100
parents 5814:5cf1c08805fb
children 5818:5733a277237a
files util/set.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/util/set.lua	Tue Sep 03 00:20:28 2013 +0100
+++ b/util/set.lua	Tue Sep 03 12:21:43 2013 +0100
@@ -75,7 +75,7 @@
 	end
 
 	function set:items()
-		return items;
+		return next, items;
 	end
 
 	function set:remove(item)