[vlc-commits] Lua: also return node name in XML's next_node() method

Jean-Philippe André git at videolan.org
Sat Jan 22 00:56:49 CET 2011


vlc | branch: master | Jean-Philippe André <jpeg at videolan.org> | Sat Jan 22 00:23:00 2011 +0100| [06fb88fa96f2717109b1eaf0c3903bbd5fe48978] | committer: Jean-Philippe André

Lua: also return node name in XML's next_node() method

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=06fb88fa96f2717109b1eaf0c3903bbd5fe48978
---

 modules/misc/lua/libs/xml.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/misc/lua/libs/xml.c b/modules/misc/lua/libs/xml.c
index 5e9683b..209fbfe 100644
--- a/modules/misc/lua/libs/xml.c
+++ b/modules/misc/lua/libs/xml.c
@@ -129,8 +129,10 @@ static int vlclua_xml_create_reader( lua_State *L )
 static int vlclua_xml_reader_next_node( lua_State *L )
 {
     xml_reader_t *p_reader = *(xml_reader_t**)luaL_checkudata( L, 1, "xml_reader" );
-    lua_pushinteger( L, xml_ReaderNextNode( p_reader, NULL ) );
-    return 1;
+    const char *psz_name;
+    lua_pushinteger( L, xml_ReaderNextNode( p_reader, &psz_name ) );
+    lua_pushstring( L, psz_name );
+    return 2;
 }
 
 static int vlclua_xml_reader_value( lua_State *L )



More information about the vlc-commits mailing list