aboutsummaryrefslogtreecommitdiffstats
path: root/util/stanza.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2008-09-17 21:33:05 +0100
committerMatthew Wild <mwild1@gmail.com>2008-09-17 21:33:05 +0100
commitf81b3a5d1fb29f636cb17e6520fea752c12767df (patch)
treed8fedebee8b85ea00c66f79255cf1193758455b0 /util/stanza.lua
parent5e38a584202a8a91313921d4a3009406e61408d2 (diff)
parenta8530586f59ae6cdd61c99546c1ffe8b9dfd10d7 (diff)
downloadprosody-f81b3a5d1fb29f636cb17e6520fea752c12767df.tar.gz
prosody-f81b3a5d1fb29f636cb17e6520fea752c12767df.zip
Merged Paul's branch
Diffstat (limited to 'util/stanza.lua')
-rw-r--r--util/stanza.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/util/stanza.lua b/util/stanza.lua
index 35277e9c..3a17fc20 100644
--- a/util/stanza.lua
+++ b/util/stanza.lua
@@ -1,6 +1,6 @@
local t_insert = table.insert;
local t_remove = table.remove;
-local format = string.format;
+local s_format = string.format;
local tostring = tostring;
local setmetatable = setmetatable;
local pairs = pairs;
@@ -97,10 +97,10 @@ function stanza_mt.__tostring(t)
local attr_string = "";
if t.attr then
- for k, v in pairs(t.attr) do if type(k) == "string" then attr_string = attr_string .. format(" %s='%s'", k, tostring(v)); end end
+ for k, v in pairs(t.attr) do if type(k) == "string" then attr_string = attr_string .. s_format(" %s='%s'", k, tostring(v)); end end
end
- return format("<%s%s>%s</%s>", t.name, attr_string, children_text, t.name);
+ return s_format("<%s%s>%s</%s>", t.name, attr_string, children_text, t.name);
end
function stanza_mt.__add(s1, s2)