Diff

util/pubsub.lua @ 6791:e813e8cf6046

Merge 0.10->trunk
author Kim Alvefur <zash@zash.se>
date Thu, 20 Aug 2015 13:05:22 +0200
parent 6516:ecd8d6437053
parent 6777:5de6b93d0190
child 7697:bd854e762875
line wrap: on
line diff
--- a/util/pubsub.lua	Mon Aug 17 01:58:53 2015 +0200
+++ b/util/pubsub.lua	Thu Aug 20 13:05:22 2015 +0200
@@ -1,8 +1,6 @@
 local events = require "util.events";
 local t_remove = table.remove;
 
-module("pubsub", package.seeall);
-
 local service = {};
 local service_mt = { __index = service };
 
@@ -15,7 +13,7 @@
 	["pubsub#max_items"] = "20";
 } };
 
-function new(config)
+local function new(config)
 	config = config or {};
 	return setmetatable({
 		config = setmetatable(config, default_config);
@@ -442,4 +440,6 @@
 	return true;
 end
 
-return _M;
+return {
+	new = new;
+};