util.stanza: Make some globals local, so they don't clutter the global checking script's output. It's also a minor optimization ;)
authorWaqas Hussain <waqas20@gmail.com>
Thu, 03 Feb 2011 13:13:49 +0500
changeset 4136 19f2830fbe02
parent 4135 9dfb3c0101b5
child 4137 7b0f6c94b8df
child 4143 eccd3c87d717
util.stanza: Make some globals local, so they don't clutter the global checking script's output. It's also a minor optimization ;)
util/stanza.lua
--- a/util/stanza.lua	Tue Feb 01 17:56:16 2011 -0800
+++ b/util/stanza.lua	Thu Feb 03 13:13:49 2011 +0500
@@ -44,11 +44,13 @@
 
 stanza_mt = { __type = "stanza" };
 stanza_mt.__index = stanza_mt;
+local stanza_mt = stanza_mt;
 
 function stanza(name, attr)
 	local stanza = { name = name, attr = attr or {}, tags = {} };
 	return setmetatable(stanza, stanza_mt);
 end
+local stanza = stanza;
 
 function stanza_mt:query(xmlns)
 	return self:tag("query", { xmlns = xmlns });