Diff

util/template.lua @ 3640:4bc88bb748d1

util.template: Don't add stanza.last_add. 20% faster.
author Waqas Hussain <waqas20@gmail.com>
date Fri, 26 Nov 2010 05:26:12 +0500
parent 3637:bd491def3efb
child 4495:c0f5c78cb817
line wrap: on
line diff
--- a/util/template.lua	Fri Nov 26 05:24:59 2010 +0500
+++ b/util/template.lua	Fri Nov 26 05:26:12 2010 +0500
@@ -78,7 +78,7 @@
 end
 local function create_clone_string(stanza, lookup, xmlns)
 	if not lookup[stanza] then
-		local s = ('setmetatable({name=%q,attr=%s,last_add={},tags={'):format(stanza.name, create_attr_string(stanza.attr, xmlns));
+		local s = ('setmetatable({name=%q,attr=%s,tags={'):format(stanza.name, create_attr_string(stanza.attr, xmlns));
 		-- add tags
 		for i,tag in ipairs(stanza.tags) do
 			s = s..create_clone_string(tag, lookup, stanza.attr.xmlns)..";";