mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-28 00:21:53 +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:
9
parser.c
9
parser.c
@ -3491,6 +3491,8 @@ xmlParseCharDataComplex(xmlParserCtxtPtr ctxt, int cdata) {
|
||||
}
|
||||
COPY_BUF(l,buf,nbchar,cur);
|
||||
if (nbchar >= XML_PARSER_BIG_BUFFER_SIZE) {
|
||||
buf[nbchar] = 0;
|
||||
|
||||
/*
|
||||
* OK the segment is to be consumed as chars.
|
||||
*/
|
||||
@ -3515,6 +3517,7 @@ xmlParseCharDataComplex(xmlParserCtxtPtr ctxt, int cdata) {
|
||||
cur = CUR_CHAR(l);
|
||||
}
|
||||
if (nbchar != 0) {
|
||||
buf[nbchar] = 0;
|
||||
/*
|
||||
* OK the segment is to be consumed as chars.
|
||||
*/
|
||||
@ -10092,7 +10095,7 @@ xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax, void *user_data,
|
||||
return(NULL);
|
||||
}
|
||||
if (sax != NULL) {
|
||||
if (ctxt->sax != &xmlDefaultSAXHandler)
|
||||
if (ctxt->sax != (xmlSAXHandlerPtr) &xmlDefaultSAXHandler)
|
||||
xmlFree(ctxt->sax);
|
||||
ctxt->sax = (xmlSAXHandlerPtr) xmlMalloc(sizeof(xmlSAXHandler));
|
||||
if (ctxt->sax == NULL) {
|
||||
@ -10185,7 +10188,7 @@ xmlCreateIOParserCtxt(xmlSAXHandlerPtr sax, void *user_data,
|
||||
return(NULL);
|
||||
}
|
||||
if (sax != NULL) {
|
||||
if (ctxt->sax != &xmlDefaultSAXHandler)
|
||||
if (ctxt->sax != (xmlSAXHandlerPtr) &xmlDefaultSAXHandler)
|
||||
xmlFree(ctxt->sax);
|
||||
ctxt->sax = (xmlSAXHandlerPtr) xmlMalloc(sizeof(xmlSAXHandler));
|
||||
if (ctxt->sax == NULL) {
|
||||
@ -11506,7 +11509,7 @@ xmlSAXUserParseFile(xmlSAXHandlerPtr sax, void *user_data,
|
||||
|
||||
ctxt = xmlCreateFileParserCtxt(filename);
|
||||
if (ctxt == NULL) return -1;
|
||||
if (ctxt->sax != &xmlDefaultSAXHandler)
|
||||
if (ctxt->sax != (xmlSAXHandlerPtr) &xmlDefaultSAXHandler)
|
||||
xmlFree(ctxt->sax);
|
||||
ctxt->sax = sax;
|
||||
xmlDetectSAX2(ctxt);
|
||||
|
Reference in New Issue
Block a user