summaryrefslogtreecommitdiff
path: root/av.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2017-01-13 12:35:26 -0700
committerKarl Williamson <khw@cpan.org>2017-02-11 14:30:28 -0700
commit9506e94549891cb5a05414c9f66deab201a54b89 (patch)
tree61c3faacb82249ed4ecce1fc3fea41923e216cb1 /av.h
parent57d92825d44f93fd84e0d8b25ef7b8e0da97134e (diff)
downloadperl-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.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/av.h b/av.h
index d6d21378e4..97ce2bc3bb 100644
--- a/av.h
+++ b/av.h
@@ -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"