summaryrefslogtreecommitdiff
path: root/av.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2016-03-07 14:44:50 -0700
committerKarl Williamson <khw@cpan.org>2016-03-07 21:01:49 -0700
commit6be58040b229d0899faf04b1ce99ce9a5e2b1344 (patch)
tree149dcf20875081f4cdf26c9e3959ba4118f2714b /av.h
parent64537f607e27e777eab9454a2e13f60e122c8369 (diff)
downloadperl-6be58040b229d0899faf04b1ce99ce9a5e2b1344.tar.gz
Add av_tindex_nomg()
This is like av_tindex, but doesn't handle magic. I'm not documenting it for now, in case it turns out this was not a good idea. Inspired from an observation by Tony Cook.
Diffstat (limited to 'av.h')
-rw-r--r--av.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/av.h b/av.h
index 30b8e52f30..9b9b373663 100644
--- a/av.h
+++ b/av.h
@@ -81,6 +81,8 @@ 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))
+
#define NEGATIVE_INDICES_VAR "NEGATIVE_INDICES"
/*