preparing a beta3 solving the ABI problems make sure the global variables
* configure.in: preparing a beta3 solving the ABI problems
* globals.c parser.c parserInternals.c testHTML.c HTMLparser.c SAX.c
include/libxml/globals.h include/libxml/SAX.h: make sure the
global variables for the default SAX handler are V1 ones to
avoid ABI compat problems.
* xmlreader.c: cleanup of uneeded code
* hash.c: fix a comment
Daniel
diff --git a/HTMLparser.c b/HTMLparser.c
index 90e2460..d2cba58 100644
--- a/HTMLparser.c
+++ b/HTMLparser.c
@@ -4102,10 +4102,10 @@
ctxt->nameMax = 10;
ctxt->name = NULL;
- if (sax == NULL) ctxt->sax = &htmlDefaultSAXHandler;
+ if (sax == NULL) ctxt->sax = (xmlSAXHandlerPtr) &htmlDefaultSAXHandler;
else {
ctxt->sax = sax;
- memcpy(sax, &htmlDefaultSAXHandler, sizeof(htmlSAXHandler));
+ memcpy(sax, &htmlDefaultSAXHandler, sizeof(xmlSAXHandlerV1));
}
ctxt->userData = ctxt;
ctxt->myDoc = NULL;
@@ -5175,7 +5175,7 @@
if(enc==XML_CHAR_ENCODING_UTF8 || buf->encoder)
ctxt->charset=XML_CHAR_ENCODING_UTF8;
if (sax != NULL) {
- if (ctxt->sax != &htmlDefaultSAXHandler)
+ if (ctxt->sax != (xmlSAXHandlerPtr) &htmlDefaultSAXHandler)
xmlFree(ctxt->sax);
ctxt->sax = (htmlSAXHandlerPtr) xmlMalloc(sizeof(htmlSAXHandler));
if (ctxt->sax == NULL) {