From 37018d9541041f8c096d300886fc94c43f174656 Mon Sep 17 00:00:00 2001 From: Richard Leach Date: Fri, 13 Aug 2021 22:50:38 +0100 Subject: av.h - addressing comments --- av.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'av.h') diff --git a/av.h b/av.h index 526699066b..a4263b4b2d 100644 --- a/av.h +++ b/av.h @@ -131,8 +131,8 @@ might be called directly: Or it might be called implicitly when the first element is stored: (void)av_store(av, 0, sv); -Whether or not any as-yet-untouched array elements are initialized by -av_extend depends upon whether the array is "real" at the time. +Unused array elements are typically initialized by av_extend, but this +is undesirable and will not be the case for some specific arrays. In contrast, when an AV is created for immediate population with a known (or likely) number of elements, it is more efficient to immediately @@ -148,8 +148,8 @@ newAV_alloc_x does not initialize the array elements - and so the expectation is that all should be initialized elsewhere prior to any potentials reads. newAV_alloc_xz does initialize the array elements. -As an example, the following examples all result in an array that can -fit four elements (indexes 0 .. 3): +The following examples all result in an array that can fit four elements +(indexes 0 .. 3): AV *av = newAV(); av_extend(av, 1); -- cgit v1.2.1