1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-23 01:52:48 +03:00

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
This commit is contained in:
Daniel Veillard
2005-07-03 22:48:50 +00:00
parent 7e33dbaa0e
commit 39e5c89016
9 changed files with 73 additions and 31 deletions

View File

@@ -664,7 +664,9 @@ struct _xmlSchemaValidCtxt {
xmlDictPtr dict;
#ifdef LIBXML_READER_ENABLED
xmlTextReaderPtr reader;
#endif
xmlSchemaAttrInfoPtr *attrInfos;
int nbAttrInfos;
@@ -18330,6 +18332,7 @@ xmlSchemaLookupNamespace(xmlSchemaValidCtxtPtr vctxt,
}
}
return (NULL);
#ifdef LIBXML_WRITER_ENABLED
} else if (vctxt->reader != NULL) {
xmlChar *nsName;
@@ -18343,6 +18346,7 @@ xmlSchemaLookupNamespace(xmlSchemaValidCtxtPtr vctxt,
return (ret);
} else
return (NULL);
#endif
} else {
xmlNsPtr ns;
@@ -23411,7 +23415,9 @@ xmlSchemaClearValidCtxt(xmlSchemaValidCtxtPtr vctxt)
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,12 +23852,14 @@ xmlSchemaVStart(xmlSchemaValidCtxtPtr vctxt)
* Tree validation.
*/
ret = xmlSchemaVDocWalk(vctxt);
#ifdef LIBXML_READER_ENABLED
} else if (vctxt->reader != NULL) {
/*
* XML Reader validation.
*/
#ifdef XML_SCHEMA_READER_ENABLED
ret = xmlSchemaVReaderWalk(vctxt);
#endif
#endif
} else if ((vctxt->sax != NULL) && (vctxt->parserCtxt != NULL)) {
/*