Software /
code /
prosody
Diff
core/xmlhandlers.lua @ 1154:570c0427fcb8
xmlhandlers: Removed an unnecessary check
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Fri, 15 May 2009 07:27:03 +0500 |
parent | 1153:1184cb19b6f2 |
child | 1155:a93b25f1528e |
line wrap: on
line diff
--- a/core/xmlhandlers.lua Fri May 15 07:24:16 2009 +0500 +++ b/core/xmlhandlers.lua Fri May 15 07:27:03 2009 +0500 @@ -14,7 +14,6 @@ local tostring = tostring; local pairs = pairs; local ipairs = ipairs; -local type = type; local t_insert = table.insert; local t_concat = table.concat; @@ -62,15 +61,13 @@ -- FIXME !!!!! for i, k in ipairs(attr) do - if type(k) == "string" then - local ns, nm = k:match("^([^|]+)|?([^|]-)$") - if ns and nm then - ns = ns_prefixes[ns]; - if ns then - attr[ns..":"..nm] = attr[k]; - attr[i] = ns..":"..nm; - attr[k] = nil; - end + local ns, nm = k:match("^([^|]+)|?([^|]-)$") + if ns and nm then + ns = ns_prefixes[ns]; + if ns then + attr[ns..":"..nm] = attr[k]; + attr[i] = ns..":"..nm; + attr[k] = nil; end end end