diff options
author | Yves Orton <demerphq@gmail.com> | 2022-03-02 09:50:17 +0100 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2022-03-03 13:41:13 +0100 |
commit | fa8d95b8b03c2668800e44b254b8adee1ddc23aa (patch) | |
tree | 9e208d6aec9e86e825922fcb0fab9466769c6521 | |
parent | 06ad1400e9c8bfd383ca5bac46553aaa9aae1e3d (diff) | |
download | perl-fa8d95b8b03c2668800e44b254b8adee1ddc23aa.tar.gz |
regcomp.c: rename "fake" argument in main entry points to study_chunk()
There are way too many uses of "fake" as a variable in this code, this
renames two of them to improve clarity. Both are used for the "deltap"
argument to study_chunk() which is not used in the top level calls.
-rw-r--r-- | regcomp.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -7987,7 +7987,7 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count, data in the pattern. If there is then we can use it for optimisations */ if (!(RExC_seen & REG_TOP_LEVEL_BRANCHES_SEEN)) { /* Only one top-level choice. */ - SSize_t fake; + SSize_t fake_deltap; STRLEN longest_length[2]; regnode_ssc ch_class; /* pointed to by data */ int stclass_flag; @@ -8141,7 +8141,7 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count, * MAIN ENTRY FOR study_chunk() FOR m/PATTERN/ * (NO top level branches) */ - minlen = study_chunk(pRExC_state, &first, &minlen, &fake, + minlen = study_chunk(pRExC_state, &first, &minlen, &fake_deltap, scan + RExC_size, /* Up to end */ &data, -1, 0, NULL, SCF_DO_SUBSTR | SCF_WHILEM_VISITED_POS | stclass_flag @@ -8254,7 +8254,7 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count, } else { /* Several toplevels. Best we can is to set minlen. */ - SSize_t fake; + SSize_t fake_deltap; regnode_ssc ch_class; SSize_t last_close = 0; @@ -8271,7 +8271,7 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count, * (patterns WITH top level branches) */ minlen = study_chunk(pRExC_state, - &scan, &minlen, &fake, scan + RExC_size, &data, -1, 0, NULL, + &scan, &minlen, &fake_deltap, scan + RExC_size, &data, -1, 0, NULL, SCF_DO_STCLASS_AND|SCF_WHILEM_VISITED_POS|(restudied ? SCF_TRIE_DOING_RESTUDY : 0), |