mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-30 22:43:14 +03:00
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
This commit is contained in:
1
parser.c
1
parser.c
@ -11568,6 +11568,7 @@ xmlCreateMemoryParserCtxt(const char *buffer, int size) {
|
||||
if (ctxt == NULL)
|
||||
return(NULL);
|
||||
|
||||
/* TODO: xmlParserInputBufferCreateStatic, requires some serious changes */
|
||||
buf = xmlParserInputBufferCreateMem(buffer, size, XML_CHAR_ENCODING_NONE);
|
||||
if (buf == NULL) {
|
||||
xmlFreeParserCtxt(ctxt);
|
||||
|
Reference in New Issue
Block a user