This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regexec.c: Another place to not re-fold
authorKarl Williamson <public@khwilliamson.com>
Sun, 16 Oct 2011 20:07:51 +0000 (14:07 -0600)
committerKarl Williamson <public@khwilliamson.com>
Tue, 18 Oct 2011 03:52:17 +0000 (21:52 -0600)
A recent commit caused regexec.c to not keep calculating the folds in
one circumstance.  This one adds the case in regmatch

regexec.c

index 071eec6..0fea67f 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -3661,7 +3661,7 @@ S_regmatch(pTHX_ regmatch_info *reginfo, regnode *prog)
        case EXACTFU:
            folder = foldEQ_latin1;
            fold_array = PL_fold_latin1;
-           fold_utf8_flags = 0;
+           fold_utf8_flags = (UTF_PATTERN) ? FOLDEQ_S1_ALREADY_FOLDED : 0;
            goto do_exactf;
 
        case EXACTFA:
@@ -3673,7 +3673,7 @@ S_regmatch(pTHX_ regmatch_info *reginfo, regnode *prog)
        case EXACTF:
            folder = foldEQ;
            fold_array = PL_fold;
-           fold_utf8_flags = 0;
+           fold_utf8_flags = (UTF_PATTERN) ? FOLDEQ_S1_ALREADY_FOLDED : 0;
 
          do_exactf:
            s = STRING(scan);