mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-24 13:33:01 +03:00
parser: Always shrink input buffer
Shrinking the input buffer is cheap now and should be done as soon as possible.
This commit is contained in:
4
parser.c
4
parser.c
@@ -2411,9 +2411,7 @@ static int spacePop(xmlParserCtxtPtr ctxt) {
|
|||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define SHRINK \
|
#define SHRINK \
|
||||||
if ((!PARSER_PROGRESSIVE(ctxt)) && \
|
if (!PARSER_PROGRESSIVE(ctxt)) \
|
||||||
(ctxt->input->cur - ctxt->input->base > 2 * INPUT_CHUNK) && \
|
|
||||||
(ctxt->input->end - ctxt->input->cur < 2 * INPUT_CHUNK)) \
|
|
||||||
xmlParserShrink(ctxt);
|
xmlParserShrink(ctxt);
|
||||||
|
|
||||||
#define GROW \
|
#define GROW \
|
||||||
|
|||||||
Reference in New Issue
Block a user