aboutsummaryrefslogtreecommitdiffstats
path: root/util/multitable.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2015-08-20 13:05:22 +0200
committerKim Alvefur <zash@zash.se>2015-08-20 13:05:22 +0200
commit6ef7c4d80892f486d71e660b054bdfdb993c8528 (patch)
tree103fd7d9396b60b9f76071a009c54d3ca9d35744 /util/multitable.lua
parenta9029bd099734436154fc4e794d3b958e54d1943 (diff)
parentd32f36b2817739d7f8d5f1208a3009b7be379562 (diff)
downloadprosody-6ef7c4d80892f486d71e660b054bdfdb993c8528.tar.gz
prosody-6ef7c4d80892f486d71e660b054bdfdb993c8528.zip
Merge 0.10->trunk
Diffstat (limited to 'util/multitable.lua')
-rw-r--r--util/multitable.lua11
1 files changed, 7 insertions, 4 deletions
diff --git a/util/multitable.lua b/util/multitable.lua
index caf25118..7a2d2b2a 100644
--- a/util/multitable.lua
+++ b/util/multitable.lua
@@ -10,7 +10,7 @@ local select = select;
local t_insert = table.insert;
local unpack, pairs, next, type = unpack, pairs, next, type;
-module "multitable"
+local _ENV = nil;
local function get(self, ...)
local t = self.data;
@@ -126,7 +126,7 @@ local function search_add(self, results, ...)
return results;
end
-function iter(self, ...)
+local function iter(self, ...)
local query = { ... };
local maxdepth = select("#", ...);
local stack = { self.data };
@@ -161,7 +161,7 @@ function iter(self, ...)
return it, self;
end
-function new()
+local function new()
return {
data = {};
get = get;
@@ -174,4 +174,7 @@ function new()
};
end
-return _M;
+return {
+ iter = iter;
+ new = new;
+};