fixing a leak detected by testapi in xmlDOMWrapAdoptNode, and fixing
* testapi.c tree.c: fixing a leak detected by testapi in
xmlDOMWrapAdoptNode, and fixing another side effect in testapi
seems to pass tests fine now.
* include/libxml/parser.h parser.c: xmlStopParser() is no more limited
to push mode
* error.c: remove a warning
* runtest.c xmllint.c: avoid compilation errors if only some parts
of the library are compiled in.
Daniel
diff --git a/xmlschemas.c b/xmlschemas.c
index c124e06..355600f 100644
--- a/xmlschemas.c
+++ b/xmlschemas.c
@@ -664,7 +664,9 @@
xmlDictPtr dict;
+#ifdef LIBXML_READER_ENABLED
xmlTextReaderPtr reader;
+#endif
xmlSchemaAttrInfoPtr *attrInfos;
int nbAttrInfos;
@@ -18330,6 +18332,7 @@
}
}
return (NULL);
+#ifdef LIBXML_WRITER_ENABLED
} else if (vctxt->reader != NULL) {
xmlChar *nsName;
@@ -18343,6 +18346,7 @@
return (ret);
} else
return (NULL);
+#endif
} else {
xmlNsPtr ns;
@@ -23411,7 +23415,9 @@
vctxt->flags = 0;
vctxt->validationRoot = NULL;
vctxt->doc = NULL;
+#ifdef LIBXML_READER_ENABLED
vctxt->reader = NULL;
+#endif
if (vctxt->value != NULL) {
xmlSchemaFreeValue(vctxt->value);
vctxt->value = NULL;
@@ -23846,6 +23852,7 @@
* Tree validation.
*/
ret = xmlSchemaVDocWalk(vctxt);
+#ifdef LIBXML_READER_ENABLED
} else if (vctxt->reader != NULL) {
/*
* XML Reader validation.
@@ -23853,6 +23860,7 @@
#ifdef XML_SCHEMA_READER_ENABLED
ret = xmlSchemaVReaderWalk(vctxt);
#endif
+#endif
} else if ((vctxt->sax != NULL) && (vctxt->parserCtxt != NULL)) {
/*
* SAX validation.