[vlc-commits] core: replace xml_reader_sys_t* by void*

Romain Vimont git at videolan.org
Thu Apr 26 01:43:03 CEST 2018


vlc | branch: master | Romain Vimont <rom1v at videolabs.io> | Tue Apr 24 09:33:28 2018 +0200| [5f00aff306a2722b1ec40ec06437c97cf342c21c] | committer: Jean-Baptiste Kempf

core: replace xml_reader_sys_t* by void*

See #17078

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 include/vlc_xml.h         |  2 +-
 modules/misc/xml/libxml.c | 11 +++++++----
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/include/vlc_xml.h b/include/vlc_xml.h
index 53db50fd03..61abc74cf8 100644
--- a/include/vlc_xml.h
+++ b/include/vlc_xml.h
@@ -66,7 +66,7 @@ struct xml_reader_t
 {
     struct vlc_common_members obj;
 
-    xml_reader_sys_t *p_sys;
+    void     *p_sys;
     stream_t *p_stream;
     module_t *p_module;
 
diff --git a/modules/misc/xml/libxml.c b/modules/misc/xml/libxml.c
index 67a849db3e..7b90954250 100644
--- a/modules/misc/xml/libxml.c
+++ b/modules/misc/xml/libxml.c
@@ -111,9 +111,10 @@ struct xml_reader_sys_t
 static int ReaderUseDTD ( xml_reader_t *p_reader )
 {
     /* Activate DTD validation */
-    xmlTextReaderSetParserProp( p_reader->p_sys->xml,
+    xml_reader_sys_t *p_sys = p_reader->p_sys;
+    xmlTextReaderSetParserProp( p_sys->xml,
                                 XML_PARSER_DEFAULTATTRS, true );
-    xmlTextReaderSetParserProp( p_reader->p_sys->xml,
+    xmlTextReaderSetParserProp( p_sys->xml,
                                 XML_PARSER_VALIDATE, true );
 
     return VLC_SUCCESS;
@@ -183,7 +184,8 @@ static char *ReaderValue( xml_reader_t *p_reader )
 
 static const char *ReaderNextAttr( xml_reader_t *p_reader, const char **pval )
 {
-    xmlTextReaderPtr xml = p_reader->p_sys->xml;
+    xml_reader_sys_t *p_sys = p_reader->p_sys;
+    xmlTextReaderPtr xml = p_sys->xml;
     const xmlChar *name, *value;
 
     if( xmlTextReaderMoveToNextAttribute( xml ) != 1
@@ -203,7 +205,8 @@ static int StreamRead( void *p_context, char *p_buffer, int i_buffer )
 
 static int ReaderIsEmptyElement( xml_reader_t *p_reader )
 {
-    return xmlTextReaderIsEmptyElement( p_reader->p_sys->xml );
+    xml_reader_sys_t *p_sys = p_reader->p_sys;
+    return xmlTextReaderIsEmptyElement( p_sys->xml );
 }
 
 static int ReaderOpen( vlc_object_t *p_this )



More information about the vlc-commits mailing list