mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-27 12:15:34 +03:00
A bit of cleanups
* tree.c: avoid calling xmlAddID with NULL values * parser.c: add a few xmlInitParser in some entry points
This commit is contained in:
@@ -1,8 +1,13 @@
|
|||||||
|
Thu Jul 9 08:43:06 CEST 2009 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
|
* tree.c: avoid calling xmlAddID with NULL values
|
||||||
|
* parser.c: add a few xmlInitParser in some entry points
|
||||||
|
|
||||||
Thu Jun 4 11:17:23 CEST 2009 Daniel Veillard <daniel@veillard.com>
|
Thu Jun 4 11:17:23 CEST 2009 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
* c14n.c debugXML.c doc/examples/io2.c parser.c schematron.c
|
* c14n.c debugXML.c doc/examples/io2.c parser.c schematron.c
|
||||||
valid.c xmlschemas.c xmlwriter.c xpath.c: use %s to printf string
|
valid.c xmlschemas.c xmlwriter.c xpath.c: use %s to printf string
|
||||||
patch by Christian Persch
|
patch by Christian Persch, fixes #581612
|
||||||
|
|
||||||
Thu Jun 4 11:06:07 CEST 2009 Daniel Veillard <daniel@veillard.com>
|
Thu Jun 4 11:06:07 CEST 2009 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
|
|||||||
4
parser.c
4
parser.c
@@ -13568,6 +13568,8 @@ xmlSAXParseMemoryWithData(xmlSAXHandlerPtr sax, const char *buffer,
|
|||||||
xmlDocPtr ret;
|
xmlDocPtr ret;
|
||||||
xmlParserCtxtPtr ctxt;
|
xmlParserCtxtPtr ctxt;
|
||||||
|
|
||||||
|
xmlInitParser();
|
||||||
|
|
||||||
ctxt = xmlCreateMemoryParserCtxt(buffer, size);
|
ctxt = xmlCreateMemoryParserCtxt(buffer, size);
|
||||||
if (ctxt == NULL) return(NULL);
|
if (ctxt == NULL) return(NULL);
|
||||||
if (sax != NULL) {
|
if (sax != NULL) {
|
||||||
@@ -13664,6 +13666,8 @@ int xmlSAXUserParseMemory(xmlSAXHandlerPtr sax, void *user_data,
|
|||||||
int ret = 0;
|
int ret = 0;
|
||||||
xmlParserCtxtPtr ctxt;
|
xmlParserCtxtPtr ctxt;
|
||||||
|
|
||||||
|
xmlInitParser();
|
||||||
|
|
||||||
ctxt = xmlCreateMemoryParserCtxt(buffer, size);
|
ctxt = xmlCreateMemoryParserCtxt(buffer, size);
|
||||||
if (ctxt == NULL) return -1;
|
if (ctxt == NULL) return -1;
|
||||||
if (ctxt->sax != (xmlSAXHandlerPtr) &xmlDefaultSAXHandler)
|
if (ctxt->sax != (xmlSAXHandlerPtr) &xmlDefaultSAXHandler)
|
||||||
|
|||||||
3
tree.c
3
tree.c
@@ -1860,7 +1860,8 @@ xmlNewPropInternal(xmlNodePtr node, xmlNsPtr ns,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (xmlIsID((node == NULL) ? NULL : node->doc, node, cur) == 1)
|
if ((value != NULL) &&
|
||||||
|
(xmlIsID((node == NULL) ? NULL : node->doc, node, cur) == 1))
|
||||||
xmlAddID(NULL, node->doc, value, cur);
|
xmlAddID(NULL, node->doc, value, cur);
|
||||||
|
|
||||||
if ((__xmlRegisterCallbacks) && (xmlRegisterNodeDefaultValue))
|
if ((__xmlRegisterCallbacks) && (xmlRegisterNodeDefaultValue))
|
||||||
|
|||||||
Reference in New Issue
Block a user