1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-20 03:52:25 +03:00

Provide new accessors for xmlOutputBuffer

To avoid digging into buf->buffer insternal strcuture the two
new entry points xmlOutputBufferGetContent() and
xmlOutputBufferGetSize() should make the ode cleaner.

* include/libxml/xmlIO.h: add two new functions
* xmlIO.c: impement the 2 functions based on the new buffer entry points
This commit is contained in:
Daniel Veillard
2012-08-06 11:16:30 +08:00
parent 187e52901b
commit e258adecd0
2 changed files with 39 additions and 0 deletions

View File

@@ -245,6 +245,12 @@ XMLPUBFUN xmlOutputBufferPtr XMLCALL
void *ioctx,
xmlCharEncodingHandlerPtr encoder);
/* Couple of APIs to get the output without digging into the buffers */
XMLPUBFUN const xmlChar * XMLCALL
xmlOutputBufferGetContent (xmlOutputBufferPtr out);
XMLPUBFUN size_t XMLCALL
xmlOutputBufferGetSize (xmlOutputBufferPtr out);
XMLPUBFUN int XMLCALL
xmlOutputBufferWrite (xmlOutputBufferPtr out,
int len,