projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9d3f189
)
xmlhandlers: Removed an unnecessary check
author
Waqas Hussain
<waqas20@gmail.com>
Fri, 15 May 2009 02:27:03 +0000
(07:27 +0500)
committer
Waqas Hussain
<waqas20@gmail.com>
Fri, 15 May 2009 02:27:03 +0000
(07:27 +0500)
core/xmlhandlers.lua
patch
|
blob
|
history
diff --git
a/core/xmlhandlers.lua
b/core/xmlhandlers.lua
index ed6f6a482b2122407f71867e3f37a698378cdf98..fc070115473be34fa59915319c5009fa5e8cc0a9 100644
(file)
--- a/
core/xmlhandlers.lua
+++ b/
core/xmlhandlers.lua
@@
-14,7
+14,6
@@
local st = stanza;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
local tostring = tostring;
local pairs = pairs;
local ipairs = ipairs;
-local type = type;
local t_insert = table.insert;
local t_concat = table.concat;
local t_insert = table.insert;
local t_concat = table.concat;
@@
-62,15
+61,13
@@
function init_xmlhandlers(session, stream_callbacks)
-- FIXME !!!!!
for i, k in ipairs(attr) do
-- 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
end
end
end