diff options
author | Karl Williamson <khw@cpan.org> | 2020-03-27 22:03:21 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2020-10-16 07:01:41 -0600 |
commit | a234542cd411731277682fb13ab4cf77e841b134 (patch) | |
tree | 87075b159898a66ad911507c7ec7da3ad98f17e6 /regcomp.c | |
parent | f97d9711c850a2acc3e6bc7156ce1e23f957b460 (diff) | |
download | perl-a234542cd411731277682fb13ab4cf77e841b134.tar.gz |
regcomp.c: Simplify
The previous commit made the opcodes for two regops adjacent, so that we
can refer to them by a single range. This commit takes advantage of
that change.
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -10685,8 +10685,8 @@ S_make_exactf_invlist(pTHX_ RExC_state_t *pRExC_state, regnode *node) /* Some characters match above-Latin1 ones under /i. This * is true of EXACTFL ones when the locale is UTF-8 */ if (HAS_NONLATIN1_SIMPLE_FOLD_CLOSURE(uc) - && (! isASCII(uc) || (OP(node) != EXACTFAA - && OP(node) != EXACTFAA_NO_TRIE))) + && (! isASCII(uc) || ! inRANGE(OP(node), EXACTFAA, + EXACTFAA_NO_TRIE))) { add_above_Latin1_folds(pRExC_state, (U8) uc, &invlist); } @@ -10767,7 +10767,7 @@ S_make_exactf_invlist(pTHX_ RExC_state_t *pRExC_state, regnode *node) UV c = (k == 0) ? first_fold : remaining_folds[k-1]; /* /aa doesn't allow folds between ASCII and non- */ - if ( (OP(node) == EXACTFAA || OP(node) == EXACTFAA_NO_TRIE) + if ( inRANGE(OP(node), EXACTFAA, EXACTFAA_NO_TRIE) && isASCII(c) != isASCII(fc)) { continue; |