diff options
author | Karl Williamson <khw@cpan.org> | 2017-01-13 12:35:26 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2017-02-11 14:30:28 -0700 |
commit | 9506e94549891cb5a05414c9f66deab201a54b89 (patch) | |
tree | 61c3faacb82249ed4ecce1fc3fea41923e216cb1 /regcomp.c | |
parent | 57d92825d44f93fd84e0d8b25ef7b8e0da97134e (diff) | |
download | perl-9506e94549891cb5a05414c9f66deab201a54b89.tar.gz |
Change av_foo_nomg() name
These names sparked some controversy when created:
http://www.nntp.perl.org/group/perl.perl5.porters/2016/03/msg235216.html
I looked through existing code for paradigms to follow, and found some
occurrences of 'skip_foo_mg'. So this commit changes the names to be
av_top_index_skip_len_mg()
av_tindex_skip_len_mg()
This is explicit about the type of magic that is ignored, and will still
be valid if another type of magic ever gets added.
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 34 |
1 files changed, 17 insertions, 17 deletions
@@ -10263,7 +10263,7 @@ S__make_exactf_invlist(pTHX_ RExC_state_t *pRExC_state, regnode *node) { AV* list = (AV*) *listp; IV k; - for (k = 0; k <= av_tindex_nomg(list); k++) { + for (k = 0; k <= av_tindex_skip_len_mg(list); k++) { SV** c_p = av_fetch(list, k, FALSE); UV c; assert(c_p); @@ -14880,7 +14880,7 @@ S_handle_regex_sets(pTHX_ RExC_state_t *pRExC_state, SV** return_invlist, no_close: /* We output the messages even if warnings are off, because we'll fail * the very next thing, and these give a likely diagnosis for that */ - if (posix_warnings && av_tindex_nomg(posix_warnings) >= 0) { + if (posix_warnings && av_tindex_skip_len_mg(posix_warnings) >= 0) { output_or_return_posix_warnings(pRExC_state, posix_warnings, NULL); } @@ -14995,7 +14995,7 @@ redo_curchar: stack, fence, fence_stack)); #endif - top_index = av_tindex_nomg(stack); + top_index = av_tindex_skip_len_mg(stack); switch (curchar) { SV** stacked_ptr; /* Ptr to something already on 'stack' */ @@ -15173,7 +15173,7 @@ redo_curchar: goto done; case ')': - if (av_tindex_nomg(fence_stack) < 0) { + if (av_tindex_skip_len_mg(fence_stack) < 0) { RExC_parse++; vFAIL("Unexpected ')'"); } @@ -15369,7 +15369,7 @@ redo_curchar: * may have altered the stack in the time since we earlier set * 'top_index'. */ - top_index = av_tindex_nomg(stack); + top_index = av_tindex_skip_len_mg(stack); if (top_index - fence >= 0) { /* If the top entry on the stack is an operator, it had better * be a '!', otherwise the entry below the top operand should @@ -15420,15 +15420,15 @@ redo_curchar: } /* End of loop parsing through the construct */ done: - if (av_tindex_nomg(fence_stack) >= 0) { + if (av_tindex_skip_len_mg(fence_stack) >= 0) { vFAIL("Unmatched ("); } - if (av_tindex_nomg(stack) < 0 /* Was empty */ + if (av_tindex_skip_len_mg(stack) < 0 /* Was empty */ || ((final = av_pop(stack)) == NULL) || ! IS_OPERAND(final) || SvTYPE(final) != SVt_INVLIST - || av_tindex_nomg(stack) >= 0) /* More left on stack */ + || av_tindex_skip_len_mg(stack) >= 0) /* More left on stack */ { bad_syntax: SvREFCNT_dec(final); @@ -15531,8 +15531,8 @@ S_dump_regex_sets_structures(pTHX_ RExC_state_t *pRExC_state, AV * stack, const IV fence, AV * fence_stack) { /* Dumps the stacks in handle_regex_sets() */ - const SSize_t stack_top = av_tindex_nomg(stack); - const SSize_t fence_stack_top = av_tindex_nomg(fence_stack); + const SSize_t stack_top = av_tindex_skip_len_mg(stack); + const SSize_t fence_stack_top = av_tindex_skip_len_mg(fence_stack); SSize_t i; PERL_ARGS_ASSERT_DUMP_REGEX_SETS_STRUCTURES; @@ -15986,7 +15986,7 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth, while (1) { if ( posix_warnings - && av_tindex_nomg(posix_warnings) >= 0 + && av_tindex_skip_len_mg(posix_warnings) >= 0 && RExC_parse > not_posix_region_end) { /* Warnings about posix class issues are considered tentative until @@ -16042,7 +16042,7 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth, * posix class, and it failed, it was a false alarm, as this * successful one proves */ if ( posix_warnings - && av_tindex_nomg(posix_warnings) >= 0 + && av_tindex_skip_len_mg(posix_warnings) >= 0 && not_posix_region_end >= RExC_parse && not_posix_region_end <= posix_class_end) { @@ -17001,7 +17001,7 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth, } /* End of loop through all the text within the brackets */ - if ( posix_warnings && av_tindex_nomg(posix_warnings) >= 0) { + if ( posix_warnings && av_tindex_skip_len_mg(posix_warnings) >= 0) { output_or_return_posix_warnings(pRExC_state, posix_warnings, return_posix_warnings); } @@ -17034,7 +17034,7 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth, #endif /* Look at the longest folds first */ - for (cp_count = av_tindex_nomg(multi_char_matches); + for (cp_count = av_tindex_skip_len_mg(multi_char_matches); cp_count > 0; cp_count--) { @@ -17416,7 +17416,7 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth, { AV* list = (AV*) *listp; IV k; - for (k = 0; k <= av_tindex_nomg(list); k++) { + for (k = 0; k <= av_tindex_skip_len_mg(list); k++) { SV** c_p = av_fetch(list, k, FALSE); UV c; assert(c_p); @@ -18107,7 +18107,7 @@ Perl__get_regclass_nonbitmap_data(pTHX_ const regexp *prog, si = *ary; /* ary[0] = the string to initialize the swash with */ - if (av_tindex_nomg(av) >= 2) { + if (av_tindex_skip_len_mg(av) >= 2) { if (only_utf8_locale_ptr && ary[2] && ary[2] != &PL_sv_undef) @@ -18123,7 +18123,7 @@ Perl__get_regclass_nonbitmap_data(pTHX_ const regexp *prog, * is any inversion list generated at compile time; [4] * indicates if that inversion list has any user-defined * properties in it. */ - if (av_tindex_nomg(av) >= 3) { + if (av_tindex_skip_len_mg(av) >= 3) { invlist = ary[3]; if (SvUV(ary[4])) { swash_init_flags |= _CORE_SWASH_INIT_USER_DEFINED_PROPERTY; |