preparing a 2.6.0-beta2 release avoid a warning avoid duplicate code in
* configure.in: preparing a 2.6.0-beta2 release
* xmlIO.c: avoid a warning
* tree.c: avoid duplicate code in xmlReplaceNode as pointed out
by Chris Ryland
* include/libxml/dict.h: add a QName access lookup to the
dictionary.
* xmlreader.c include/libxml/xmlreader.h: adding const access
based on the dictionary interface for string read from the
reader, the node content access is still TODO, it's too different
Daniel
diff --git a/tree.c b/tree.c
index 0e4a6f4..a65fda8 100644
--- a/tree.c
+++ b/tree.c
@@ -3435,20 +3435,6 @@
#endif
return(old);
}
- if ((old->type==XML_ATTRIBUTE_NODE) && (cur->type!=XML_ATTRIBUTE_NODE)) {
-#ifdef DEBUG_TREE
- xmlGenericError(xmlGenericErrorContext,
- "xmlReplaceNode : Trying to replace attribute node with other node type\n");
-#endif
- return(old);
- }
- if ((cur->type==XML_ATTRIBUTE_NODE) && (old->type!=XML_ATTRIBUTE_NODE)) {
-#ifdef DEBUG_TREE
- xmlGenericError(xmlGenericErrorContext,
- "xmlReplaceNode : Trying to replace a non-attribute node with attribute node\n");
-#endif
- return(old);
- }
xmlUnlinkNode(cur);
cur->doc = old->doc;
cur->parent = old->parent;
@@ -6420,7 +6406,7 @@
if (buf->content == NULL) return;
buf->use = 0;
if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) {
- buf->content="";
+ buf->content = "";
} else {
memset(buf->content, 0, buf->size);
}