From b9b31e9d0400a852436a6d750c074dc32b69492e Mon Sep 17 00:00:00 2001 From: David Mitchell Date: Fri, 14 Sep 2012 11:28:08 +0100 Subject: [PATCH] regmatch(): use nextchar where available In a couple of places the code was using *locinput, where nextchar already equalled *locinput --- regexec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/regexec.c b/regexec.c index f207cda..d606238 100644 --- a/regexec.c +++ b/regexec.c @@ -3412,7 +3412,7 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode *prog) /* In this case the charclass data is available inline so we can fail fast without a lot of extra overhead. */ - if(!ANYOF_BITMAP_TEST(scan, *locinput)) { + if(!ANYOF_BITMAP_TEST(scan, nextchr)) { DEBUG_EXECUTE_r( PerlIO_printf(Perl_debug_log, "%*s %sfailed to match trie start class...%s\n", @@ -3477,7 +3477,7 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode *prog) HV * widecharmap = MUTABLE_HV(rexi->data->data[ ARG( scan ) + 1 ]); U32 state = trie->startstate; - if (trie->bitmap && !TRIE_BITMAP_TEST(trie,*locinput) ) { + if (trie->bitmap && !TRIE_BITMAP_TEST(trie, nextchr) ) { if (trie->states[ state ].wordnum) { DEBUG_EXECUTE_r( PerlIO_printf(Perl_debug_log, -- 1.8.3.1