diff options
author | Karl Williamson <khw@cpan.org> | 2018-11-18 15:12:02 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2018-11-26 22:24:33 -0700 |
commit | 5bac62cf21849bc59401425b51eaffd56e878a6e (patch) | |
tree | 2a233a24ef74b74980b4b1e7b65bd028072c9ca9 /regexec.c | |
parent | c4ead7708a7283c887e9bdc266dc06135def9671 (diff) | |
download | perl-5bac62cf21849bc59401425b51eaffd56e878a6e.tar.gz |
regexec.c: Expand out macro in only remaining use
There is only one call to this macro. It's easier to understand if
expanded out instead of the call. The next commit will refactor.
Diffstat (limited to 'regexec.c')
-rw-r--r-- | regexec.c | 11 |
1 files changed, 3 insertions, 8 deletions
@@ -107,13 +107,6 @@ static const char* const non_utf8_target_but_utf8_required #define STATIC static #endif -/* Valid only if 'c', the character being looke-up, is an invariant under - * UTF-8: it avoids the reginclass call if there are no complications: i.e., if - * everything matchable is straight forward in the bitmap */ -#define REGINCLASS(prog,p,c,u) (ANYOF_FLAGS(p) \ - ? reginclass(prog,p,c,c+1,u) \ - : ANYOF_BITMAP_TEST(p,*(c))) - /* * Forwards. */ @@ -6714,7 +6707,9 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode *prog) locinput += UTF8SKIP(locinput); } else { - if (!REGINCLASS(rex, scan, (U8*)locinput, utf8_target)) + if (ANYOF_FLAGS(scan) + ? ! reginclass(rex, scan, (U8*) locinput, (U8*) locinput+1, utf8_target) + : ! ANYOF_BITMAP_TEST(scan, *(U8*) locinput)) sayNO; locinput++; } |