1
0
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:
Nick Wellnhofer
2025-01-30 01:26:01 +01:00
parent 0de90f518d
commit 218264fada

View File

@@ -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 \