aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2008-08-30 12:52:26 +0000
committerDaniel Veillard <veillard@src.gnome.org>2008-08-30 12:52:26 +0000
commite83e93e715709bb0d117c5386d89f0e5b08d1484 (patch)
treeb361e8c1cd3041aa451552f65555d43ab6f14d99 /include
parent28b7b4bd80e0c4b9b04e0f68f0cff563c6560cc3 (diff)
downloadandroid_external_libxml2-e83e93e715709bb0d117c5386d89f0e5b08d1484.tar.gz
android_external_libxml2-e83e93e715709bb0d117c5386d89f0e5b08d1484.tar.bz2
android_external_libxml2-e83e93e715709bb0d117c5386d89f0e5b08d1484.zip
make a new kind of buffer where shrinking and adding in head can avoid
* include/libxml/tree.h tree.c: make a new kind of buffer where shrinking and adding in head can avoid reallocation or full buffer memmoves * encoding.c xmlIO.c: use the new kind of buffers for output buffers Daniel svn path=/trunk/; revision=3787
Diffstat (limited to 'include')
-rw-r--r--include/libxml/tree.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/libxml/tree.h b/include/libxml/tree.h
index 5afac525..6a6a09d9 100644
--- a/include/libxml/tree.h
+++ b/include/libxml/tree.h
@@ -71,9 +71,10 @@ typedef xmlEntity *xmlEntityPtr;
*/
typedef enum {
- XML_BUFFER_ALLOC_DOUBLEIT,
- XML_BUFFER_ALLOC_EXACT,
- XML_BUFFER_ALLOC_IMMUTABLE
+ XML_BUFFER_ALLOC_DOUBLEIT, /* double each time one need to grow */
+ XML_BUFFER_ALLOC_EXACT, /* grow only to the minimal size */
+ XML_BUFFER_ALLOC_IMMUTABLE, /* immutable buffer */
+ XML_BUFFER_ALLOC_IO /* special allocation scheme used for I/O */
} xmlBufferAllocationScheme;
/**
@@ -88,6 +89,7 @@ struct _xmlBuffer {
unsigned int use; /* The buffer size used */
unsigned int size; /* The buffer size */
xmlBufferAllocationScheme alloc; /* The realloc method */
+ xmlChar *contentIO; /* in IO mode we may have a different base */
};
/**