Skip to content

Commit

Permalink
applied patch from Alfred Mickautsch to flush the output at the end of
Browse files Browse the repository at this point in the history
* 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
Daniel Veillard committed Feb 13, 2008
1 parent 851b2d0 commit 3ff2411
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 5 additions & 0 deletions 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> Fri Feb 8 11:57:03 CET 2008 Daniel Veillard <daniel@veillard.com>


* doc/examples/examples.xml: regenerated, it was truncated. * doc/examples/examples.xml: regenerated, it was truncated.
Expand Down
8 changes: 6 additions & 2 deletions xmlwriter.c
Expand Up @@ -626,9 +626,10 @@ xmlTextWriterStartDocument(xmlTextWriterPtr writer, const char *version,
* xmlTextWriterEndDocument: * xmlTextWriterEndDocument:
* @writer: the xmlTextWriterPtr * @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 int
xmlTextWriterEndDocument(xmlTextWriterPtr writer) xmlTextWriterEndDocument(xmlTextWriterPtr writer)
Expand Down Expand Up @@ -702,6 +703,9 @@ xmlTextWriterEndDocument(xmlTextWriterPtr writer)
return -1; return -1;
sum += count; sum += count;
} }

sum += xmlTextWriterFlush(writer);

return sum; return sum;
} }


Expand Down

0 comments on commit 3ff2411

Please sign in to comment.