1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-19 05:43:19 +03:00

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
This commit is contained in:
Daniel Veillard
2003-09-25 14:29:29 +00:00
parent 7a02cfe0d7
commit 092643b52d
14 changed files with 169 additions and 443 deletions

View File

@ -4102,10 +4102,10 @@ htmlInitParserCtxt(htmlParserCtxtPtr ctxt)
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 @@ htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax, void *user_data,
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) {