1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-21 14:53:44 +03:00

parser: Add more parser context accessors

Fixes #763.
This commit is contained in:
Nick Wellnhofer
2025-03-08 22:07:15 +01:00
parent 5237d90fae
commit 5f0b1378d7
6 changed files with 344 additions and 23 deletions

View File

@@ -5927,13 +5927,7 @@ htmlCtxtParseDocument(htmlParserCtxtPtr ctxt, xmlParserInputPtr input)
ctxt->html = INSERT_INITIAL;
htmlParseDocument(ctxt);
if (ctxt->errNo != XML_ERR_NO_MEMORY) {
ret = ctxt->myDoc;
} else {
ret = NULL;
xmlFreeDoc(ctxt->myDoc);
}
ctxt->myDoc = NULL;
ret = xmlCtxtGetDocument(ctxt);
/* assert(ctxt->inputNr == 1); */
while (ctxt->inputNr > 0)