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