summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2018-09-29 09:03:12 -0600
committerKarl Williamson <khw@cpan.org>2018-09-30 10:46:33 -0600
commitdebce029c15e140a130915fddf3799a92814a061 (patch)
tree5f7e403d95ba233d87f4e762805902a35e2a3fc2 /regexec.c
parente9c7e9d5f2fc347241a1e059223cbb02398b19bf (diff)
downloadperl-debce029c15e140a130915fddf3799a92814a061.tar.gz
regexec.c: Remove macro use for further clarity
Commit 4c83fb55d7096a1d0e6a7a8e25d20b186be3281d added a macro for clarity. I have since realized that it is even clearer to spell things as this commit now does.
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/regexec.c b/regexec.c
index eaf7bd0d12..ec9ce02b6d 100644
--- a/regexec.c
+++ b/regexec.c
@@ -10305,7 +10305,6 @@ Perl_isSCRIPT_RUN(pTHX_ const U8 * s, const U8 * send, const bool utf8_target)
/* What code point is the digit '0' of the script run? */
UV zero_of_run = 0;
-#define SEEN_A_DIGIT (zero_of_run != 0)
SCX_enum script_of_run = SCX_INVALID; /* Illegal value */
SCX_enum script_of_char = SCX_INVALID;
@@ -10362,7 +10361,7 @@ Perl_isSCRIPT_RUN(pTHX_ const U8 * s, const U8 * send, const bool utf8_target)
retval = FALSE;
break;
}
- if (SEEN_A_DIGIT) {
+ if (zero_of_run) {
if (zero_of_run != '0') {
retval = FALSE;
break;
@@ -10388,7 +10387,7 @@ Perl_isSCRIPT_RUN(pTHX_ const U8 * s, const U8 * send, const bool utf8_target)
/* If is within the range [+0 .. +9] of the script's zero, it also is a
* digit in that script. We can skip the rest of this code for this
* character. */
- if (UNLIKELY( SEEN_A_DIGIT
+ if (UNLIKELY( zero_of_run
&& cp >= zero_of_run
&& cp - zero_of_run <= 9))
{
@@ -10453,7 +10452,7 @@ Perl_isSCRIPT_RUN(pTHX_ const U8 * s, const U8 * send, const bool utf8_target)
/* But Common contains several sets of digits. Only the '0' set
* can be part of another script. */
- if (SEEN_A_DIGIT && zero_of_run != '0') {
+ if (zero_of_run && zero_of_run != '0') {
retval = FALSE;
break;
}