diff options
author | Tony Cook <tony@develop-help.com> | 2019-10-09 11:12:09 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2019-10-10 20:13:28 -0600 |
commit | c983409f490b4a541fa05fb421d7ee150d4faf07 (patch) | |
tree | 642127211e8d56934aa4e22fea3863b427d75313 /regexec.c | |
parent | 01aed385e6bdbdcfd13bb66e9d8b7c55d2cfc34a (diff) | |
download | perl-c983409f490b4a541fa05fb421d7ee150d4faf07.tar.gz |
regexec.c: Fix Win32 compilation
The macro being called here had a parameter that was a function call and
was used multiple times in the macro, exceeding some limits on Win32,
and potentially being actually called multiple times.
Diffstat (limited to 'regexec.c')
-rw-r--r-- | regexec.c | 22 |
1 files changed, 12 insertions, 10 deletions
@@ -6527,9 +6527,9 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode *prog) if (locinput == reginfo->strbeg) b1 = isWORDCHAR_LC('\n'); else { - b1 = isWORDCHAR_LC_utf8_safe(reghop3((U8*)locinput, -1, - (U8*)(reginfo->strbeg)), - (U8*)(reginfo->strend)); + U8 *p = reghop3((U8*)locinput, -1, + (U8*)(reginfo->strbeg)); + b1 = isWORDCHAR_LC_utf8_safe(p, (U8*)(reginfo->strend)); } b2 = (NEXTCHR_IS_EOS) ? isWORDCHAR_LC('\n') @@ -6606,13 +6606,15 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode *prog) case TRADITIONAL_BOUND: { bool b1, b2; - b1 = (locinput == reginfo->strbeg) - ? 0 /* isWORDCHAR_L1('\n') */ - : isWORDCHAR_utf8_safe( - reghop3((U8*)locinput, - -1, - (U8*)(reginfo->strbeg)), - (U8*) reginfo->strend); + if (locinput == reginfo->strbeg) { + b1 = 0 /* isWORDCHAR_L1('\n') */; + } + else { + U8 *p = reghop3((U8*)locinput, -1, + (U8*)(reginfo->strbeg)); + + b1 = isWORDCHAR_utf8_safe(p, (U8*) reginfo->strend); + } b2 = (NEXTCHR_IS_EOS) ? 0 /* isWORDCHAR_L1('\n') */ : isWORDCHAR_utf8_safe((U8*)locinput, |