mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-24 13:33:01 +03:00
io: Don't shrink memory input buffers
This commit is contained in:
5
parser.c
5
parser.c
@@ -2115,7 +2115,10 @@ static int spacePop(xmlParserCtxtPtr ctxt) {
|
||||
xmlSHRINK (ctxt);
|
||||
|
||||
static void xmlSHRINK (xmlParserCtxtPtr ctxt) {
|
||||
xmlParserInputShrink(ctxt->input);
|
||||
/* Don't shrink memory buffers. */
|
||||
if ((ctxt->input->buf) &&
|
||||
((ctxt->input->buf->encoder) || (ctxt->input->buf->readcallback)))
|
||||
xmlParserInputShrink(ctxt->input);
|
||||
if (*ctxt->input->cur == 0)
|
||||
xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user