aboutsummaryrefslogtreecommitdiffstats
path: root/util/stanza.lua
diff options
context:
space:
mode:
authorbt <bt@silverblade>2008-09-17 22:20:08 +0300
committerbt <bt@silverblade>2008-09-17 22:20:08 +0300
commit2e735c5b6cdf59c4a96af39497b66a1e36371aea (patch)
tree17d2628674a17e597c4ddb3bfbc71105cd369504 /util/stanza.lua
parent8af81638a0d17d3cec2d8f73e156546679af5a4c (diff)
downloadprosody-2e735c5b6cdf59c4a96af39497b66a1e36371aea.tar.gz
prosody-2e735c5b6cdf59c4a96af39497b66a1e36371aea.zip
Some docs written by Thorns. Need reviewing.
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)