mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-24 13:33:01 +03:00
globals: Remove unused globals from thread storage
Setting these deprecated globals hasn't had an effect for a long time. Make them constants. This reduces the size of per-thread storage from ~700 to ~250 bytes.
This commit is contained in:
15
HTMLparser.c
15
HTMLparser.c
@@ -4844,10 +4844,12 @@ htmlParseDocument(htmlParserCtxtPtr ctxt) {
|
||||
}
|
||||
|
||||
/*
|
||||
* SAX: beginning of the document processing.
|
||||
* Document locator is unused. Only for backward compatibility.
|
||||
*/
|
||||
if ((ctxt->sax) && (ctxt->sax->setDocumentLocator))
|
||||
ctxt->sax->setDocumentLocator(ctxt->userData, &xmlDefaultSAXLocator);
|
||||
if ((ctxt->sax) && (ctxt->sax->setDocumentLocator)) {
|
||||
xmlSAXLocator copy = xmlDefaultSAXLocator;
|
||||
ctxt->sax->setDocumentLocator(ctxt->userData, ©);
|
||||
}
|
||||
|
||||
xmlDetectEncoding(ctxt);
|
||||
|
||||
@@ -5435,9 +5437,10 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
|
||||
SKIP_BLANKS;
|
||||
avail = in->end - in->cur;
|
||||
}
|
||||
if ((ctxt->sax) && (ctxt->sax->setDocumentLocator))
|
||||
ctxt->sax->setDocumentLocator(ctxt->userData,
|
||||
&xmlDefaultSAXLocator);
|
||||
if ((ctxt->sax) && (ctxt->sax->setDocumentLocator)) {
|
||||
xmlSAXLocator copy = xmlDefaultSAXLocator;
|
||||
ctxt->sax->setDocumentLocator(ctxt->userData, ©);
|
||||
}
|
||||
if ((ctxt->sax) && (ctxt->sax->startDocument) &&
|
||||
(!ctxt->disableSAX))
|
||||
ctxt->sax->startDocument(ctxt->userData);
|
||||
|
||||
Reference in New Issue
Block a user