diff options
-rw-r--r-- | regexec.c | 10 | ||||
-rw-r--r-- | utf8.c | 8 | ||||
-rw-r--r-- | utf8.h | 2 |
3 files changed, 10 insertions, 10 deletions
@@ -1538,7 +1538,7 @@ S_find_byclass(pTHX_ regexp * prog, const regnode *c, char *s, case EXACTFL: if (is_utf8_pat || utf8_target) { - utf8_fold_flags = FOLDEQ_UTF8_LOCALE; + utf8_fold_flags = FOLDEQ_LOCALE; goto do_exactf_utf8; } fold_array = PL_fold_locale; @@ -4244,7 +4244,7 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode *prog) RX_MATCH_TAINTED_on(reginfo->prog); folder = foldEQ_locale; fold_array = PL_fold_locale; - fold_utf8_flags = FOLDEQ_UTF8_LOCALE; + fold_utf8_flags = FOLDEQ_LOCALE; goto do_exactf; case EXACTFU_SS: /* /\x{df}/iu */ @@ -4799,7 +4799,7 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode *prog) folder = foldEQ_locale; fold_array = PL_fold_locale; type = REFFL; - utf8_fold_flags = FOLDEQ_UTF8_LOCALE; + utf8_fold_flags = FOLDEQ_LOCALE; goto do_nref; case NREFFA: /* /\g{name}/iaa */ @@ -4843,7 +4843,7 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode *prog) RX_MATCH_TAINTED_on(reginfo->prog); folder = foldEQ_locale; fold_array = PL_fold_locale; - utf8_fold_flags = FOLDEQ_UTF8_LOCALE; + utf8_fold_flags = FOLDEQ_LOCALE; goto do_ref; case REFFA: /* /\1/iaa */ @@ -6947,7 +6947,7 @@ S_regrepeat(pTHX_ regexp *prog, char **startposp, const regnode *p, case EXACTFL: RXp_MATCH_TAINTED_on(prog); - utf8_flags = FOLDEQ_UTF8_LOCALE; + utf8_flags = FOLDEQ_LOCALE; goto do_exactf; case EXACTF: /* This node only generated for non-utf8 patterns */ @@ -4061,7 +4061,7 @@ L<http://www.unicode.org/unicode/reports/tr21/> (Case Mappings). * 0 for as-documented above * FOLDEQ_UTF8_NOMIX_ASCII meaning that if a non-ASCII character folds to an ASCII one, to not match - * FOLDEQ_UTF8_LOCALE meaning that locale rules are to be used for code + * FOLDEQ__LOCALE meaning that locale rules are to be used for code * points below 256; unicode rules for above 255; and * folds that cross those boundaries are disallowed, * like the NOMIX_ASCII option @@ -4087,7 +4087,7 @@ Perl_foldEQ_utf8_flags(pTHX_ const char *s1, char **pe1, UV l1, bool u1, const c PERL_ARGS_ASSERT_FOLDEQ_UTF8_FLAGS; - assert( ! ((flags & (FOLDEQ_UTF8_NOMIX_ASCII | FOLDEQ_UTF8_LOCALE)) + assert( ! ((flags & (FOLDEQ_UTF8_NOMIX_ASCII | FOLDEQ_LOCALE)) && (flags & (FOLDEQ_S1_ALREADY_FOLDED | FOLDEQ_S2_ALREADY_FOLDED)))); /* The algorithm is to trial the folds without regard to the flags on * the first line of the above assert(), and then see if the result @@ -4160,7 +4160,7 @@ Perl_foldEQ_utf8_flags(pTHX_ const char *s1, char **pe1, UV l1, bool u1, const c /* If in locale matching, we use two sets of rules, depending * on if the code point is above or below 255. Here, we test * for and handle locale rules */ - if ((flags & FOLDEQ_UTF8_LOCALE) + if ((flags & FOLDEQ_LOCALE) && (! u1 || ! UTF8_IS_ABOVE_LATIN1(*p1))) { /* There is no mixing of code points above and below 255. */ @@ -4205,7 +4205,7 @@ Perl_foldEQ_utf8_flags(pTHX_ const char *s1, char **pe1, UV l1, bool u1, const c n2 = UTF8SKIP(f2); } else { - if ((flags & FOLDEQ_UTF8_LOCALE) + if ((flags & FOLDEQ_LOCALE) && (! u2 || ! UTF8_IS_ABOVE_LATIN1(*p2))) { /* Here, the next char in s2 is < 256. We've already @@ -58,7 +58,7 @@ #define foldEQ_utf8(s1, pe1, l1, u1, s2, pe2, l2, u2) \ foldEQ_utf8_flags(s1, pe1, l1, u1, s2, pe2, l2, u2, 0) #define FOLDEQ_UTF8_NOMIX_ASCII (1 << 0) -#define FOLDEQ_UTF8_LOCALE (1 << 1) +#define FOLDEQ_LOCALE (1 << 1) #define FOLDEQ_S1_ALREADY_FOLDED (1 << 2) #define FOLDEQ_S2_ALREADY_FOLDED (1 << 3) |