SAX2: Always make xmlSAX2{Start,End}Element public

Simplify symbol availability logic.
This commit is contained in:
Nick Wellnhofer 2024-06-15 23:57:39 +02:00
parent f307237e14
commit 11c3f84b6c
4 changed files with 12 additions and 9 deletions

12
SAX2.c
View File

@ -1673,6 +1673,18 @@ xmlSAX2EndElement(void *ctx, const xmlChar *name ATTRIBUTE_UNUSED)
*/
nodePop(ctxt);
}
#else /* LIBXML_SAX1_ENABLED || LIBXML_HTML_ENABLED || LIBXML_LEGACY_ENABLED */
/** DOC_DISABLE */
void
xmlSAX2StartElement(void *ctx ATTRIBUTE_UNUSED,
const xmlChar *fullname ATTRIBUTE_UNUSED,
const xmlChar **atts ATTRIBUTE_UNUSED) {
}
void
xmlSAX2EndElement(void *ctx ATTRIBUTE_UNUSED,
const xmlChar *name ATTRIBUTE_UNUSED) {
}
/** DOC_ENABLE */
#endif /* LIBXML_SAX1_ENABLED || LIBXML_HTML_ENABLED || LIBXML_LEGACY_ENABLED */
/*

View File

@ -13050,7 +13050,6 @@ Could we use @subtypes for this?'/>
<arg name='ctx' type='void *' info='the user data (XML parser context)'/>
</function>
<function name='xmlSAX2EndElement' file='SAX2' module='SAX2'>
<cond>defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_LEGACY_ENABLED)</cond>
<info>called when the end of an element has been detected.</info>
<return type='void'/>
<arg name='ctx' type='void *' info='the user data (XML parser context)'/>
@ -13196,7 +13195,6 @@ Could we use @subtypes for this?'/>
<arg name='ctx' type='void *' info='the user data (XML parser context)'/>
</function>
<function name='xmlSAX2StartElement' file='SAX2' module='SAX2'>
<cond>defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_LEGACY_ENABLED)</cond>
<info>called when an opening tag has been processed.</info>
<return type='void'/>
<arg name='ctx' type='void *' info='the user data (XML parser context)'/>

View File

@ -95,8 +95,6 @@ XMLPUBFUN void
xmlSAX2StartDocument (void *ctx);
XMLPUBFUN void
xmlSAX2EndDocument (void *ctx);
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
XMLPUBFUN void
xmlSAX2StartElement (void *ctx,
const xmlChar *fullname,
@ -104,7 +102,6 @@ XMLPUBFUN void
XMLPUBFUN void
xmlSAX2EndElement (void *ctx,
const xmlChar *name);
#endif /* LIBXML_SAX1_ENABLED or LIBXML_HTML_ENABLED or LIBXML_LEGACY_ENABLED */
XMLPUBFUN void
xmlSAX2StartElementNs (void *ctx,
const xmlChar *localname,

View File

@ -4191,7 +4191,6 @@ static int
test_xmlSAX2EndElement(void) {
int test_ret = 0;
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
#ifdef LIBXML_SAX1_ENABLED
int mem_base;
void * ctx; /* the user data (XML parser context) */
@ -4221,7 +4220,6 @@ test_xmlSAX2EndElement(void) {
}
}
function_tests++;
#endif
#endif
return(test_ret);
@ -5121,7 +5119,6 @@ static int
test_xmlSAX2StartElement(void) {
int test_ret = 0;
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
#ifdef LIBXML_SAX1_ENABLED
int mem_base;
void * ctx; /* the user data (XML parser context) */
@ -5158,7 +5155,6 @@ test_xmlSAX2StartElement(void) {
}
}
function_tests++;
#endif
#endif
return(test_ret);