diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2024-07-03 19:05:44 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2024-07-03 19:05:44 -0700 |
commit | 9aa751c8a4f845ef2d2bba091c81ffeded941afd (patch) | |
tree | bad5ad6a84f1fe05f353d757aea30c962b4d785e /regex.c | |
parent | 0ccf4483d8ed2ad5805116df5dba4a858e5c373a (diff) | |
download | txr-9aa751c8a4f845ef2d2bba091c81ffeded941afd.tar.gz txr-9aa751c8a4f845ef2d2bba091c81ffeded941afd.tar.bz2 txr-9aa751c8a4f845ef2d2bba091c81ffeded941afd.zip |
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.
Diffstat (limited to 'regex.c')
-rw-r--r-- | regex.c | 1 |
1 files changed, 0 insertions, 1 deletions
@@ -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: |