On Tue, Feb 12, 2008 at 12:15:43PM +0100, Mickautsch, Alfred wrote:
> > I propose that xmlFreeTextWriter be renamed to xmlCloseTextWriter. This
> > follows the convention of file I/O through stdio. After fopen(), one
> > uses the fclose() function to flush out the buffers and deallocate
> > resources. One cannot use free() on the file pointer without potentially
> > disasterous results. This is the distinction between a "close" function
> > and a "free" function. A "close" function flushes data from buffers
> > before freeing resources, whereas a "free" function only frees
> > resources.
> 
> Since xmlFreeTextWriter behaves more like a destructor it could as well be 
> called xmlDeleteTextWriter. From another point of view, maybe 
> xmlTextWriterEndDocument should call xmlTextWriterFlush, so there would be no 
> need for xmlOutputBufferClose to flush the buffer itself and the behaviour of 
> xmlFreeTextWriter would match the behaviour you expect from it.
> 

  yes, Flushing at the end of the EndDocument functions would make sense,
could you design such a patch ?

 thanks !

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
[EMAIL PROTECTED]  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to