summaryrefslogtreecommitdiff
path: root/SAX2.c
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2022-11-24 16:38:47 +0100
committerNick Wellnhofer <wellnhofer@aevum.de>2022-11-25 15:02:04 +0100
commitcecd364dd2f55810ab27eb0f44b35197a1a358d8 (patch)
tree294ea3c3eb5782852a4c249625943e801af67183 /SAX2.c
parent1406b20fe9c2f5e9bd1dd11cfa08bc3d81b294c2 (diff)
downloadlibxml2-cecd364dd2f55810ab27eb0f44b35197a1a358d8.tar.gz
parser: Don't call *DefaultSAXHandlerInit from xmlInitParser
Change the default handler definitions to match the result after calling the initialization functions. This makes sure that no thread-local variables are accessed when calling xmlInitParser.
Diffstat (limited to 'SAX2.c')
-rw-r--r--SAX2.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/SAX2.c b/SAX2.c
index f6321c68..c825f73c 100644
--- a/SAX2.c
+++ b/SAX2.c
@@ -2937,7 +2937,7 @@ xmlSAX2InitDefaultSAXHandler(xmlSAXHandler *hdlr, int warning)
/**
* xmlDefaultSAXHandlerInit:
*
- * DEPRECATED: This function will be made private. Call xmlInitParser to
+ * DEPRECATED: This function is a no-op. Call xmlInitParser to
* initialize the library.
*
* Initialize the default SAX2 handler
@@ -2945,9 +2945,6 @@ xmlSAX2InitDefaultSAXHandler(xmlSAXHandler *hdlr, int warning)
void
xmlDefaultSAXHandlerInit(void)
{
-#ifdef LIBXML_SAX1_ENABLED
- xmlSAXVersion((xmlSAXHandlerPtr) &xmlDefaultSAXHandler, 1);
-#endif /* LIBXML_SAX1_ENABLED */
}
#ifdef LIBXML_HTML_ENABLED
@@ -2998,17 +2995,12 @@ xmlSAX2InitHtmlDefaultSAXHandler(xmlSAXHandler *hdlr)
/**
* htmlDefaultSAXHandlerInit:
*
- * DEPRECATED: This function will be made private. Call xmlInitParser to
+ * DEPRECATED: This function is a no-op. Call xmlInitParser to
* initialize the library.
- *
- * Initialize the default SAX handler
*/
void
htmlDefaultSAXHandlerInit(void)
{
-#ifdef LIBXML_SAX1_ENABLED
- xmlSAX2InitHtmlDefaultSAXHandler((xmlSAXHandlerPtr) &htmlDefaultSAXHandler);
-#endif
}
#endif /* LIBXML_HTML_ENABLED */