Skip to content
Browse files

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
  • Loading branch information...
1 parent 851b2d0 commit 3ff24115d2d95342ae1adc387560907d63f99ec7 Daniel Veillard committed Feb 13, 2008
Showing with 11 additions and 2 deletions.
  1. +5 −0 ChangeLog
  2. +6 −2 xmlwriter.c
View
5 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.
View
8 xmlwriter.c
@@ -626,9 +626,10 @@ xmlTextWriterStartDocument(xmlTextWriterPtr writer, const char *version,
* 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 @@ xmlTextWriterEndDocument(xmlTextWriterPtr writer)
return -1;
sum += count;
}
+
+ sum += xmlTextWriterFlush(writer);
+
return sum;
}

0 comments on commit 3ff2411

Please sign in to comment.
Something went wrong with that request. Please try again.