add streaming on memory regression tests, found bad bugs in the reader
* Makefile.am: add streaming on memory regression tests, found
bad bugs in the reader interface
* xmlreader.c: fixing bugs w.r.t. very large names, and special
condition in end of file.
* xmlIO.c tree.c include/libxml/tree.h include/libxml/xmlIO.h:
adding immutable buffers, and parser input based on those,
but this should not be used (yet) for general parsing
* parser.c: added a comment about using immutable buffers for
general parsing.
* result/bigname.xml.rdr result/bigname2.xml.rdr: fixing the
output of the regression tests
* xmllint.c: using the immutable buffers when streaming on
mmaped file (--stream --memory)
Daniel
diff --git a/include/libxml/tree.h b/include/libxml/tree.h
index 9a236a4..5ead191 100644
--- a/include/libxml/tree.h
+++ b/include/libxml/tree.h
@@ -416,7 +416,8 @@
typedef enum {
XML_BUFFER_ALLOC_DOUBLEIT,
- XML_BUFFER_ALLOC_EXACT
+ XML_BUFFER_ALLOC_EXACT,
+ XML_BUFFER_ALLOC_IMMUTABLE
} xmlBufferAllocationScheme;
/**
@@ -581,6 +582,9 @@
xmlBufferCreate (void);
XMLPUBFUN xmlBufferPtr XMLCALL
xmlBufferCreateSize (size_t size);
+XMLPUBFUN xmlBufferPtr XMLCALL
+ xmlBufferCreateStatic (void *mem,
+ size_t size);
XMLPUBFUN int XMLCALL
xmlBufferResize (xmlBufferPtr buf,
unsigned int size);