applied patch from Alfred Mickautsch to flush the output at the end of
* xmlwriter.c: applied patch from Alfred Mickautsch to flush the
output at the end of document.
Daniel
svn path=/trunk/; revision=3691
diff --git a/ChangeLog b/ChangeLog
index 773fafa..8479b17 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Feb 13 10:56:38 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * xmlwriter.c: applied patch from Alfred Mickautsch to flush the
+ output at the end of document.
+
Fri Feb 8 11:57:03 CET 2008 Daniel Veillard <daniel@veillard.com>
* doc/examples/examples.xml: regenerated, it was truncated.
diff --git a/xmlwriter.c b/xmlwriter.c
index 2d9d109..c6959b8 100644
--- a/xmlwriter.c
+++ b/xmlwriter.c
@@ -626,9 +626,10 @@
* xmlTextWriterEndDocument:
* @writer: the xmlTextWriterPtr
*
- * End an xml document. All open elements are closed
+ * End an xml document. All open elements are closed, and
+ * the content is flushed to the output.
*
- * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ * Returns the bytes written or -1 in case of error
*/
int
xmlTextWriterEndDocument(xmlTextWriterPtr writer)
@@ -702,6 +703,9 @@
return -1;
sum += count;
}
+
+ sum += xmlTextWriterFlush(writer);
+
return sum;
}