aboutsummaryrefslogtreecommitdiffstats
path: root/util/set.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2013-09-03 12:21:43 +0100
committerMatthew Wild <mwild1@gmail.com>2013-09-03 12:21:43 +0100
commitbd8755411c872988afb0343e0e39492f280d8a90 (patch)
treec55d968821a48f4da0260a7c05e208b2c4884207 /util/set.lua
parent8eb7b73968209de2031d534abad17045f956a35e (diff)
downloadprosody-bd8755411c872988afb0343e0e39492f280d8a90.tar.gz
prosody-bd8755411c872988afb0343e0e39492f280d8a90.zip
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.
Diffstat (limited to 'util/set.lua')
-rw-r--r--util/set.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/set.lua b/util/set.lua
index a2df669c..89cd7cf3 100644
--- a/util/set.lua
+++ b/util/set.lua
@@ -75,7 +75,7 @@ function new(list)
end
function set:items()
- return items;
+ return next, items;
end
function set:remove(item)