diff options
author | Karl Williamson <khw@cpan.org> | 2018-01-29 09:51:45 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2018-01-29 16:29:44 -0700 |
commit | 1971914578c14bb2ffc687f6556c41148781acfc (patch) | |
tree | 6097ed86e95e8e095afca29ece494462feab0c3a /regexec.c | |
parent | 21d1ed54f05b0cc903eaa25cbc4575df1a5a89ed (diff) | |
download | perl-1971914578c14bb2ffc687f6556c41148781acfc.tar.gz |
regexec.c: Extract some macro code into a submacro
A future commit will reuse this code, so will avoid duplication.
Diffstat (limited to 'regexec.c')
-rw-r--r-- | regexec.c | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -1737,12 +1737,7 @@ STMT_START { \ #define REXEC_FBC_CLASS_SCAN_GUTS(UTF8, COND) \ if (COND) { \ - if ( ( doevery \ - || s != previous_occurrence_end) \ - && (reginfo->intuit || regtry(reginfo, &s))) \ - { \ - goto got_it; \ - } \ + FBC_CHECK_AND_TRY \ s += ((UTF8) ? UTF8SKIP(s) : 1); \ previous_occurrence_end = s; \ } \ @@ -1758,6 +1753,14 @@ STMT_START { \ REXEC_FBC_CLASS_SCAN(0, COND); \ } +#define FBC_CHECK_AND_TRY \ + if ( ( doevery \ + || s != previous_occurrence_end) \ + && (reginfo->intuit || regtry(reginfo, &s))) \ + { \ + goto got_it; \ + } + /* The three macros below are slightly different versions of the same logic. * * The first is for /a and /aa when the target string is UTF-8. This can only |