aboutsummaryrefslogtreecommitdiffstats
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
commit2d58001a25c924d5e77e568c9984981443aee5ad (patch)
treef956272e973735a218432f5dcb1dca190215f3f8
parentd76cfb4b2de54dedf5c8dffa301b6baa4d54f327 (diff)
downloadprosody-2d58001a25c924d5e77e568c9984981443aee5ad.tar.gz
prosody-2d58001a25c924d5e77e568c9984981443aee5ad.zip
util.pubsub: One less table allocated per pubsub object created
-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 = {};