diff options
author | Simon Cozens <simon@netthink.co.uk> | 2001-03-31 14:09:59 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-03-31 15:50:18 +0000 |
commit | 319cef53be1e4f9b9d5f4c92c429de1b9c0b0640 (patch) | |
tree | 2c827d1f8dafd6fa772d8deb229febc58a45acf9 | |
parent | cd5c4fcec809b2856fa6108149fbf2c281764644 (diff) | |
download | perl-319cef53be1e4f9b9d5f4c92c429de1b9c0b0640.tar.gz |
Re: [PATCH] av.h cosmetics
Message-ID: <20010331130959.A22000@netthink.co.uk>
Document AvALLOC.
p4raw-id: //depot/perl@9490
-rw-r--r-- | pod/perlguts.pod | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pod/perlguts.pod b/pod/perlguts.pod index 35741c6225..e18abba4a8 100644 --- a/pod/perlguts.pod +++ b/pod/perlguts.pod @@ -247,6 +247,15 @@ portion of the string between the "real" and the "fake" beginnings is shown in parentheses, and the values of C<SvCUR> and C<SvLEN> reflect the fake beginning, not the real one. +Something similar to the offset hack is perfomed on AVs to enable +efficient shifting and splicing off the beginning of the array; while +C<AvARRAY> points to the first element in the array that is visible from +Perl, C<AvALLOC> points to the real start of the C array. These are +usually the same, but a C<shift> operation can be carried out by +increasing C<AvARRAY> by one and decreasing C<AvFILL> and C<AvLEN>. +Again, the location of the real start of the C array only comes into +play when freeing the array. See C<av_shift> in F<av.c>. + =head2 What's Really Stored in an SV? Recall that the usual method of determining the type of scalar you have is |