aboutsummaryrefslogtreecommitdiffstats
path: root/util/pubsub.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2014-09-28 00:05:21 +0200
committerKim Alvefur <zash@zash.se>2014-09-28 00:05:21 +0200
commitd8283439b246eaa29d7a7e1ba9bb0aa06ee49c69 (patch)
treef956272e973735a218432f5dcb1dca190215f3f8 /util/pubsub.lua
parentcf3215b032b9fc21e673f1a7029b5e644e650d67 (diff)
downloadprosody-d8283439b246eaa29d7a7e1ba9bb0aa06ee49c69.tar.gz
prosody-d8283439b246eaa29d7a7e1ba9bb0aa06ee49c69.zip
util.pubsub: One less table allocated per pubsub object created
Diffstat (limited to 'util/pubsub.lua')
-rw-r--r--util/pubsub.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/util/pubsub.lua b/util/pubsub.lua
index afab634a..3c67be90 100644
--- a/util/pubsub.lua
+++ b/util/pubsub.lua
@@ -6,16 +6,16 @@ module("pubsub", package.seeall);
local service = {};
local service_mt = { __index = service };
-local default_config = {
+local default_config = { __index = {
broadcaster = function () end;
get_affiliation = function () end;
capabilities = {};
-};
+} };
function new(config)
config = config or {};
return setmetatable({
- config = setmetatable(config, { __index = default_config });
+ config = setmetatable(config, default_config);
affiliations = {};
subscriptions = {};
nodes = {};