Diff

util/stanza.lua @ 4136:19f2830fbe02

util.stanza: Make some globals local, so they don't clutter the global checking script's output. It's also a minor optimization ;)
author Waqas Hussain <waqas20@gmail.com>
date Thu, 03 Feb 2011 13:13:49 +0500
parent 4132:ccc16434dbe2
child 4146:a361c578c1f2
child 4168:4919831b5b56
line wrap: on
line diff
--- 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 });