1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-03-21 22:50:08 +03:00

Revert "Support xmlTextReaderNextSibling w/o preparsed doc"

This reverts commit bfec41b3de1cbd35e547b57c80ae3a5101f8891c which
caused problems with the XML::LibXML Perl bindings.

https://mail.gnome.org/archives/xml/2018-November/msg00010.html
This commit is contained in:
Nick Wellnhofer 2018-11-23 22:56:03 +01:00
parent a71b98ec9d
commit 6fc04d714a

View File

@ -2027,6 +2027,7 @@ found_node:
*
* Skip to the node following the current one in document order while
* avoiding the subtree if any.
* Currently implemented only for Readers built on a document
*
* Returns 1 if the node was read successfully, 0 if there is no more
* nodes to read, or -1 in case of error
@ -2035,16 +2036,16 @@ int
xmlTextReaderNextSibling(xmlTextReaderPtr reader) {
if (reader == NULL)
return(-1);
if (reader->doc == NULL) {
/* TODO */
return(-1);
}
if (reader->state == XML_TEXTREADER_END)
return(0);
if (reader->node == NULL) {
if (reader->doc != NULL)
return(xmlTextReaderNextTree(reader));
else
return(xmlTextReaderRead(reader));
}
if (reader->node == NULL)
return(xmlTextReaderNextTree(reader));
if (reader->node->next != NULL) {
reader->node = reader->node->next;