Commit 61c3b36a authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

xml: remove vlc_xml_ReaderReset()

parent 670bfe6c
......@@ -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 )
{
......
......@@ -734,7 +734,6 @@ text_style_New
xml_Delete
xml_ReaderCreate
xml_ReaderDelete
xml_ReaderReset
vlc_xml_decode
vlc_xml_encode
vlc_keycode2str
......
......@@ -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;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment