[vlc-commits] xml: remove vlc_xml_ReaderReset()

Rémi Denis-Courmont git at videolan.org
Tue Apr 3 17:14:07 CEST 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Apr  2 13:02:16 2018 +0300| [61c3b36ab63dfea5427ede03ffd80bd0f84ba2de] | committer: Rémi Denis-Courmont

xml: remove vlc_xml_ReaderReset()

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

 include/vlc_xml.h  |  1 -
 src/libvlccore.sym |  1 -
 src/misc/xml.c     | 30 +-----------------------------
 3 files changed, 1 insertion(+), 31 deletions(-)

diff --git a/include/vlc_xml.h b/include/vlc_xml.h
index 922d206e08..7ceae3455a 100644
--- a/include/vlc_xml.h
+++ b/include/vlc_xml.h
@@ -80,7 +80,6 @@ struct xml_reader_t
 VLC_API xml_reader_t * xml_ReaderCreate(vlc_object_t *, stream_t *) VLC_USED;
 #define xml_ReaderCreate( a, s ) xml_ReaderCreate(VLC_OBJECT(a), s)
 VLC_API void xml_ReaderDelete(xml_reader_t *);
-VLC_API xml_reader_t * xml_ReaderReset(xml_reader_t *, stream_t *) VLC_USED;
 
 static inline int xml_ReaderNextNode( xml_reader_t *reader, const char **pval )
 {
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index eb3c82837d..e1a928c3b7 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -734,7 +734,6 @@ text_style_New
 xml_Delete
 xml_ReaderCreate
 xml_ReaderDelete
-xml_ReaderReset
 vlc_xml_decode
 vlc_xml_encode
 vlc_keycode2str
diff --git a/src/misc/xml.c b/src/misc/xml.c
index e145a5fa7a..18122032b1 100644
--- a/src/misc/xml.c
+++ b/src/misc/xml.c
@@ -94,34 +94,6 @@ xml_reader_t *xml_ReaderCreate(vlc_object_t *obj, stream_t *stream)
  */
 void xml_ReaderDelete(xml_reader_t *reader)
 {
-    if (reader->p_stream)
-        module_stop(reader, reader->p_module);
+    module_stop(reader, reader->p_module);
     vlc_object_release(reader);
 }
-
-
-/**
- * Resets an existing XML reader.
- * If you need to parse several XML files, this function is much faster than
- * xml_ReaderCreate() and xml_ReaderDelete() combined.
- * If the stream parameter is NULL, the XML reader will be stopped, but
- * not restarted until the next xml_ReaderReset() call with a non-NULL stream.
- *
- * @param reader XML reader to reinitialize
- * @param stream new stream to read XML data from (or NULL)
- * @return reader on success,
- *         NULL on error (in that case, the reader is destroyed).
- */
-xml_reader_t *xml_ReaderReset(xml_reader_t *reader, stream_t *stream)
-{
-    if (reader->p_stream)
-        module_stop(reader, reader->p_module);
-
-    reader->p_stream = stream;
-    if ((stream != NULL) && module_start(reader, reader->p_module))
-    {
-        vlc_object_release(reader);
-        return NULL;
-    }
-    return reader;
-}



More information about the vlc-commits mailing list