diff options
author | Karl Williamson <khw@cpan.org> | 2020-08-19 11:57:17 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2020-08-19 16:12:19 -0600 |
commit | 87306e0674dfe3af29804b4641347cd5ac9b0521 (patch) | |
tree | 8693933fae0918d3570f6d4d412ac8d91eea5160 /av.h | |
parent | 62066149de47fdbff345b71823d783ffad25933f (diff) | |
download | perl-87306e0674dfe3af29804b4641347cd5ac9b0521.tar.gz |
Add av_count()
This returns the number of elements in an array in a clearly named
function.
av_top_index(), av_tindex() are clearly named, but are less than ideal,
and came about because no one back then thought of this one, until now
Paul Evans did.
Diffstat (limited to 'av.h')
-rw-r--r-- | av.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -81,7 +81,8 @@ Same as C<av_top_index()>. #define AvFILL(av) ((SvRMAGICAL((const SV *) (av))) \ ? mg_size(MUTABLE_SV(av)) : AvFILLp(av)) -#define av_tindex(av) av_top_index(av) +#define av_top_index(av) AvFILL(av) +#define av_tindex(av) av_top_index(av) /* Note that it doesn't make sense to do this: * SvGETMAGIC(av); IV x = av_tindex_nomg(av); |