diff options
author | Karl Williamson <khw@cpan.org> | 2016-03-19 22:48:54 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2016-03-19 23:00:35 -0600 |
commit | 8dbc0cc7f2b47d12cdda7f5e0c7ac82ebda704f2 (patch) | |
tree | d18b91d453060cece2967b5ec674fe9407eb99e5 /av.h | |
parent | 4ae69d38605cf6ef02d0d304ad4fbb45603ecabb (diff) | |
download | perl-8dbc0cc7f2b47d12cdda7f5e0c7ac82ebda704f2.tar.gz |
Imprison at_tindex_nomg()
This name is controversial. Use #ifdef's to keep it from being exposed
outside of the places that already use it. And don't publicize that it
exists.
Diffstat (limited to 'av.h')
-rw-r--r-- | av.h | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -81,7 +81,14 @@ Same as C<av_top_index()>. ? mg_size(MUTABLE_SV(av)) : AvFILLp(av)) #define av_tindex(av) av_top_index(av) -#define av_tindex_nomg(av) (__ASSERT_(SvTYPE(av) == SVt_PVAV) AvFILLp(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 NEGATIVE_INDICES_VAR "NEGATIVE_INDICES" |