diff options
author | Karl Williamson <khw@cpan.org> | 2020-04-21 06:41:22 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2020-10-12 09:45:46 -0600 |
commit | 7436a695ce7392c1cebf34ae9b05b77c9e5b86f9 (patch) | |
tree | a80a875233f0baf0884ff52766185fdfbf34231a /regcomp.c | |
parent | 1aab533b71752bd887772a5c5c5c5480e2c23387 (diff) | |
download | perl-7436a695ce7392c1cebf34ae9b05b77c9e5b86f9.tar.gz |
regcomp.c: Combine common code
This bit of code occurs in two places. Move it so that it gets executed
before the split, so it only has to be specified once.
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -12633,12 +12633,13 @@ S_regpiece(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth) op = *RExC_parse; +#ifdef RE_TRACK_PATTERN_OFFSETS + parse_start = RExC_parse; +#endif + if (op == '{') { const char* endptr; maxpos = NULL; -#ifdef RE_TRACK_PATTERN_OFFSETS - parse_start = RExC_parse; /* MJD */ -#endif next = RExC_parse + 1; while (isDIGIT(*next) || *next == ',') { if (*next == ',') { @@ -12791,9 +12792,6 @@ S_regpiece(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth) vFAIL("Regexp *+ operand could be empty"); #endif -#ifdef RE_TRACK_PATTERN_OFFSETS - parse_start = RExC_parse; -#endif nextchar(pRExC_state); *flagp = HASWIDTH; |