mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-01-26 10:03:34 +03:00
Remove htmlDefaultSAXHandler from non-SAX1 build
This matches long-standing behavior of the XML counterpart.
This commit is contained in:
parent
80bd34c3c6
commit
4b184240be
@ -6338,7 +6338,9 @@ htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax, void *user_data,
|
||||
if(enc==XML_CHAR_ENCODING_UTF8 || buf->encoder)
|
||||
ctxt->charset=XML_CHAR_ENCODING_UTF8;
|
||||
if (sax != NULL) {
|
||||
#ifdef LIBXML_SAX1_ENABLED
|
||||
if (ctxt->sax != (xmlSAXHandlerPtr) &htmlDefaultSAXHandler)
|
||||
#endif
|
||||
xmlFree(ctxt->sax);
|
||||
ctxt->sax = (htmlSAXHandlerPtr) xmlMalloc(sizeof(htmlSAXHandler));
|
||||
if (ctxt->sax == NULL) {
|
||||
|
2
SAX2.c
2
SAX2.c
@ -2998,7 +2998,9 @@ xmlSAX2InitHtmlDefaultSAXHandler(xmlSAXHandler *hdlr)
|
||||
void
|
||||
htmlDefaultSAXHandlerInit(void)
|
||||
{
|
||||
#ifdef LIBXML_SAX1_ENABLED
|
||||
xmlSAX2InitHtmlDefaultSAXHandler((xmlSAXHandlerPtr) &htmlDefaultSAXHandler);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* LIBXML_HTML_ENABLED */
|
||||
|
@ -405,7 +405,7 @@ xmlSAXLocator xmlDefaultSAXLocator = {
|
||||
xmlSAX2GetColumnNumber
|
||||
};
|
||||
|
||||
#ifdef LIBXML_HTML_ENABLED
|
||||
#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_SAX1_ENABLED)
|
||||
/**
|
||||
* htmlDefaultSAXHandler:
|
||||
*
|
||||
@ -667,7 +667,7 @@ xmlThrDefOutputBufferCreateFilenameDefault(xmlOutputBufferCreateFilenameFunc fun
|
||||
return(old);
|
||||
}
|
||||
|
||||
#ifdef LIBXML_HTML_ENABLED
|
||||
#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_SAX1_ENABLED)
|
||||
#undef htmlDefaultSAXHandler
|
||||
xmlSAXHandlerV1 *
|
||||
__htmlDefaultSAXHandler(void) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user