Diff

util/multitable.lua @ 6791:e813e8cf6046

Merge 0.10->trunk
author Kim Alvefur <zash@zash.se>
date Thu, 20 Aug 2015 13:05:22 +0200
parent 6777:5de6b93d0190
child 7185:5687788a2e4d
line wrap: on
line diff
--- a/util/multitable.lua	Mon Aug 17 01:58:53 2015 +0200
+++ b/util/multitable.lua	Thu Aug 20 13:05:22 2015 +0200
@@ -10,7 +10,7 @@
 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 @@
 	return results;
 end
 
-function iter(self, ...)
+local function iter(self, ...)
 	local query = { ... };
 	local maxdepth = select("#", ...);
 	local stack = { self.data };
@@ -161,7 +161,7 @@
 	return it, self;
 end
 
-function new()
+local function new()
 	return {
 		data = {};
 		get = get;
@@ -174,4 +174,7 @@
 	};
 end
 
-return _M;
+return {
+	iter = iter;
+	new = new;
+};