code cleanup, especially the function comments. fixed a small bug when
* DOCBparser.c HTMLparser.c c14n.c debugXML.c encoding.c hash.c
nanoftp.c nanohttp.c parser.c parserInternals.c testC14N.c
testDocbook.c threads.c tree.c valid.c xmlIO.c xmllint.c xmlmemory.c
xmlreader.c xmlregexp.c xmlschemas.c xmlschemastypes.c xpath.c:
code cleanup, especially the function comments.
* tree.c: fixed a small bug when freeing nodes which are XInclude ones.
Daniel
diff --git a/tree.c b/tree.c
index cf50bce..60ae931 100644
--- a/tree.c
+++ b/tree.c
@@ -2589,7 +2589,9 @@
if ((cur->children != NULL) &&
(cur->type != XML_ENTITY_REF_NODE))
xmlFreeNodeList(cur->children);
- if ((cur->type == XML_ELEMENT_NODE) &&
+ if (((cur->type == XML_ELEMENT_NODE) ||
+ (cur->type == XML_XINCLUDE_START) ||
+ (cur->type == XML_XINCLUDE_END)) &&
(cur->properties != NULL))
xmlFreePropList(cur->properties);
if ((cur->type != XML_ELEMENT_NODE) &&
@@ -2667,7 +2669,10 @@
if ((cur->children != NULL) &&
(cur->type != XML_ENTITY_REF_NODE))
xmlFreeNodeList(cur->children);
- if ((cur->type == XML_ELEMENT_NODE) && (cur->properties != NULL))
+ if (((cur->type == XML_ELEMENT_NODE) ||
+ (cur->type == XML_XINCLUDE_START) ||
+ (cur->type == XML_XINCLUDE_END)) &&
+ (cur->properties != NULL))
xmlFreePropList(cur->properties);
if ((cur->type != XML_ELEMENT_NODE) &&
(cur->content != NULL) &&
@@ -3407,7 +3412,7 @@
/**
* xmlGetLineNo:
- * @node : valid node
+ * @node: valid node
*
* Get line number of node. this requires activation of this option
* before invoking the parser by calling xmlLineNumbersDefault(1)
@@ -4695,7 +4700,7 @@
}
/**
- * xmlNewReconciliedNs
+ * xmlNewReconciliedNs:
* @doc: the document
* @tree: a node expected to hold the new namespace
* @ns: the original namespace
@@ -4761,7 +4766,7 @@
}
/**
- * xmlReconciliateNs
+ * xmlReconciliateNs:
* @doc: the document
* @tree: a node defining the subtree to reconciliate
*
@@ -7459,7 +7464,7 @@
}
/**
- * xmlSaveFormatFileEnc
+ * xmlSaveFormatFileEnc:
* @filename: the filename or URL to output
* @cur: the document being saved
* @encoding: the name of the encoding to use or NULL.