[vlc-commits] XML: fix two small mistakes in Lua
Jean-Philippe André
git at videolan.org
Sat Jan 22 14:45:23 CET 2011
vlc | branch: master | Jean-Philippe André <jpeg at videolan.org> | Sat Jan 22 14:44:55 2011 +0100| [d16fe011b9a968d359e6b37fd679621c947b7e67] | committer: Jean-Philippe André
XML: fix two small mistakes in Lua
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d16fe011b9a968d359e6b37fd679621c947b7e67
---
modules/misc/lua/libs/xml.c | 2 +-
share/lua/modules/simplexml.lua | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/misc/lua/libs/xml.c b/modules/misc/lua/libs/xml.c
index ace308a..74f05f9 100644
--- a/modules/misc/lua/libs/xml.c
+++ b/modules/misc/lua/libs/xml.c
@@ -140,7 +140,7 @@ static int vlclua_xml_reader_next_attr( lua_State *L )
lua_pushstring( L, xml_ReaderNextAttr( p_reader, &psz_value ) );
lua_pushstring( L, psz_value );
- return 1;
+ return 2;
}
void luaopen_xml( lua_State *L )
diff --git a/share/lua/modules/simplexml.lua b/share/lua/modules/simplexml.lua
index 2b7f18d..851b7e6 100644
--- a/share/lua/modules/simplexml.lua
+++ b/share/lua/modules/simplexml.lua
@@ -75,7 +75,7 @@ local function parsexml(stream, errormsg)
table.remove(parents)
end
elseif nodetype == 3 then
- table.insert(tree.children, reader:value())
+ table.insert(tree.children, nodename)
end
nodetype, nodename = reader:next_node()
end
More information about the vlc-commits
mailing list