diff options
author | Karl Williamson <khw@cpan.org> | 2018-10-14 16:19:27 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2018-10-20 00:09:55 -0600 |
commit | d918054a120f41e56d69788846d8283091c527f8 (patch) | |
tree | ad56cd5200a5a2e1847f1301a81d8c3243b6bcce | |
parent | a9f8f0e7ea8fdf2c9f0e78f6e01b9ef605907200 (diff) | |
download | perl-d918054a120f41e56d69788846d8283091c527f8.tar.gz |
regcomp.c: Move some declarations
This is in preparation for some blocks to be removed in a future commit,
so the declarations have to be at the top of the enclosing block
-rw-r--r-- | regcomp.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -8485,6 +8485,7 @@ STATIC SV* S_reg_scan_name(pTHX_ RExC_state_t *pRExC_state, U32 flags) { char *name_start = RExC_parse; + SV* sv_name; PERL_ARGS_ASSERT_REG_SCAN_NAME; @@ -8508,8 +8509,7 @@ S_reg_scan_name(pTHX_ RExC_state_t *pRExC_state, U32 flags) vFAIL("Group name must start with a non-digit word character"); } if ( flags ) { - SV* sv_name - = newSVpvn_flags(name_start, (int)(RExC_parse - name_start), + sv_name = newSVpvn_flags(name_start, (int)(RExC_parse - name_start), SVs_TEMP | (UTF ? SVf_UTF8 : 0)); if ( flags == REG_RSN_RETURN_NAME) return sv_name; @@ -11417,6 +11417,7 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth) { U32 n = 0; struct reg_code_block *cb; + OP * o; RExC_seen_zerolen++; @@ -11435,7 +11436,7 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth) cb = &pRExC_state->code_blocks->cb[pRExC_state->code_index]; RExC_parse = RExC_start + cb->end; if (!SIZE_ONLY) { - OP *o = cb->block; + o = cb->block; if (cb->src_regex) { n = add_data(pRExC_state, STR_WITH_LEN("rl")); RExC_rxi->data->data[n] = @@ -17235,6 +17236,8 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth, && classnum != _CC_ASCII #endif ) { + SV* scratch_list = NULL; + /* What the Posix classes (like \w, [:space:]) match in locale * isn't knowable under locale until actual match time. Room * must be reserved (one time per outer bracketed class) to @@ -17278,7 +17281,6 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth, * Just add them, in the second pass, to the * unconditionally-matched list */ if (! SIZE_ONLY) { - SV* scratch_list = NULL; /* Get the list of the above-Latin1 code points this * matches */ |