From 158b05f88107501586f35dde9afd3c1444e148e1 Mon Sep 17 00:00:00 2001 From: Richard Leach Date: Mon, 5 Jul 2021 10:52:46 +0100 Subject: av_new_alloc: revise description of size parameter --- av.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/av.c b/av.c index afac896dda..d2f0e0db45 100644 --- a/av.c +++ b/av.c @@ -403,11 +403,10 @@ This is similar to but more efficient than doing: AV *av = newAV(); av_extend(av, key); -The zeroflag parameter controls whether the array is NULL initialized. +The size parameter is used to pre-allocate a SV* array large enough to +hold at least elements 0..(size-1). size must be at least 1. -Note that av_index() takes the desired AvMAX as its key parameter, but -av_new_alloc() instead takes the desired size (so AvMAX + 1). This -size must be at least 1. +The zeroflag parameter controls whether the array is NULL initialized. =cut */ -- cgit v1.2.1