From 9506e94549891cb5a05414c9f66deab201a54b89 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Fri, 13 Jan 2017 12:35:26 -0700 Subject: 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. --- av.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'av.h') 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. ? 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" -- cgit v1.2.1