summaryrefslogtreecommitdiff
path: root/av.c
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2013-11-15 13:40:03 -0700
committerKarl Williamson <khw@cpan.org>2014-05-31 19:09:22 -0600
commitb985ae615210d15bfa67bddb2118de1c02c21935 (patch)
treeac6eafb37eb413c56b04ce6dcf4a2b0ffa3aa267 /av.c
parentca3d51ba62f0e2b46d3714c26711c8973a3724bb (diff)
downloadperl-b985ae615210d15bfa67bddb2118de1c02c21935.tar.gz
PATCH: [perl #120386]: av_len documentation
I think I have incorporated everybody's concerns in this patch.
Diffstat (limited to 'av.c')
-rw-r--r--av.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/av.c b/av.c
index c08d2c2d3f..0602525a45 100644
--- a/av.c
+++ b/av.c
@@ -760,11 +760,16 @@ The Perl equivalent for this is C<$#myarray>.
(A slightly shorter form is C<av_tindex>.)
+=for apidoc av_tindex
+
+Same as L</av_top_index>.
+
=for apidoc av_len
-Same as L</av_top_index>. Returns the highest index in the array. Note that the
-return value is +1 what its name implies it returns; and hence differs in
-meaning from what the similarly named L</sv_len> returns.
+Same as L</av_top_index>. Note that, unlike what the name implies, it returns
+the highest index in the array, so to get the size of the array you need to use
+S<C<av_len(av) + 1>>. This is unlike L</sv_len>, which returns what you would
+expect.
=cut
*/