summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2020-03-27 22:03:21 -0600
committerKarl Williamson <khw@cpan.org>2020-10-16 07:01:41 -0600
commita234542cd411731277682fb13ab4cf77e841b134 (patch)
tree87075b159898a66ad911507c7ec7da3ad98f17e6 /regcomp.c
parentf97d9711c850a2acc3e6bc7156ce1e23f957b460 (diff)
downloadperl-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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/regcomp.c b/regcomp.c
index 733548111b..3b40a170a6 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -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;