From 3dbd8b277944c6612e6c784cc4b59c555b6a33d7 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Fri, 5 Jun 2020 05:56:43 -0600 Subject: regcomp,regexec: Shorten #define name This names a flag bit whose meaning depends on context. The previous name contained both meanings, and was simply too long to be comprehensible. This commit splits it into two names, with the suffix '_shared'. It's not necessary to know precisely what the other meaning is when reading the code, only that it has another meaning. --- regexec.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'regexec.c') diff --git a/regexec.c b/regexec.c index 01f73aa17e..da2b05e256 100644 --- a/regexec.c +++ b/regexec.c @@ -10605,8 +10605,7 @@ S_reginclass(pTHX_ regexp * const prog, const regnode * const n, const U8* const if (c < NUM_ANYOF_CODE_POINTS && ! inRANGE(OP(n), ANYOFH, ANYOFHb)) { if (ANYOF_BITMAP_TEST(n, c)) match = TRUE; - else if ((flags - & ANYOF_SHARED_d_MATCHES_ALL_NON_UTF8_NON_ASCII_non_d_WARN_SUPER) + else if ( (flags & ANYOFD_shared_NON_UTF8_MATCHES_ALL_NON_ASCII) && OP(n) == ANYOFD && ! utf8_target && ! isASCII(c)) @@ -10749,8 +10748,7 @@ S_reginclass(pTHX_ regexp * const prog, const regnode * const n, const U8* const } if (UNICODE_IS_SUPER(c) - && (flags - & ANYOF_SHARED_d_MATCHES_ALL_NON_UTF8_NON_ASCII_non_d_WARN_SUPER) + && (flags & ANYOF_shared_WARN_SUPER) && OP(n) != ANYOFD && ckWARN_d(WARN_NON_UNICODE)) { -- cgit v1.2.1