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 /av.h | |
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 'av.h')
-rw-r--r-- | av.h | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -81,14 +81,12 @@ Same as C<av_top_index()>. ? mg_size(MUTABLE_SV(av)) : AvFILLp(av)) #define av_tindex(av) av_top_index(av) -#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_UTF8_C) /* Note that it doesn't make sense to do this: * SvGETMAGIC(av); IV x = av_tindex_nomg(av); - * This name is controversial, and so is restricted by the #ifdef to the places - * it already occurs */ -# define av_tindex_nomg(av) (__ASSERT_(SvTYPE(av) == SVt_PVAV) AvFILLp(av)) -#endif +# define av_top_index_skip_len_mg(av) \ + (__ASSERT_(SvTYPE(av) == SVt_PVAV) AvFILLp(av)) +# define av_tindex_skip_len_mg(av) av_top_index_skip_len_mg(av) #define NEGATIVE_INDICES_VAR "NEGATIVE_INDICES" |