From e7ce1b7d7da3fdebee6d5ba67f359bc6e3bb9e52 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 3 Jul 2024 19:05:44 -0700 Subject: regex: eliminate unnecessary stack push. * regex.c (scan_until_common): in the REGM_MATCH case, there is no need to push the current character into the unget stack. That character is not supposed to be pushed back, and it won't be because it's below the match point; the stack node just ends up recycled at the end of the function. --- regex.c | 1 - 1 file changed, 1 deletion(-) diff --git a/regex.c b/regex.c index eda096f3..aaddec64 100644 --- a/regex.c +++ b/regex.c @@ -3237,7 +3237,6 @@ static val scan_until_common(val self, val regex, val stream_in, match = stack; goto out_match; case REGM_MATCH: - push(ch, &stack); match = stack; continue; case REGM_INCOMPLETE: -- cgit v1.2.3