projects
/
prosody.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge 0.10->trunk
[prosody.git]
/
util
/
multitable.lua
diff --git
a/util/multitable.lua
b/util/multitable.lua
index caf25118e3f622ecd66dbea06b5c24de7abba968..7a2d2b2a4224548977339e66fbb0c3cc4eca8631 100644
(file)
--- 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;
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;
local function get(self, ...)
local t = self.data;
@@
-126,7
+126,7
@@
local function search_add(self, results, ...)
return results;
end
return results;
end
-function iter(self, ...)
+
local
function iter(self, ...)
local query = { ... };
local maxdepth = select("#", ...);
local stack = { self.data };
local query = { ... };
local maxdepth = select("#", ...);
local stack = { self.data };
@@
-161,7
+161,7
@@
function iter(self, ...)
return it, self;
end
return it, self;
end
-function new()
+
local
function new()
return {
data = {};
get = get;
return {
data = {};
get = get;
@@
-174,4
+174,7
@@
function new()
};
end
};
end
-return _M;
+return {
+ iter = iter;
+ new = new;
+};