summaryrefslogtreecommitdiff
path: root/pod
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-01-21 13:36:08 +0000
committerNicholas Clark <nick@ccl4.org>2009-01-21 17:09:11 +0000
commitcbfd0a879b2bf2ade4a309e6d56c08ba19f320e1 (patch)
tree7771d5ecf7d2b77cf43976ba2a814084ccbca4f5 /pod
parent6673a63c63e2a65dbfcc835d6499cc97c449c67b (diff)
downloadperl-cbfd0a879b2bf2ade4a309e6d56c08ba19f320e1.tar.gz
Update the documentation of get_av() to note that it calls Perl_gv_fetchpv(),
and hence the 'create' argument is actually 'flags'. Fix code and documentation that used TRUE or FALSE to use 0 or GV_ADD.
Diffstat (limited to 'pod')
-rw-r--r--pod/perlapi.pod9
-rw-r--r--pod/perlembed.pod2
-rw-r--r--pod/perlguts.pod4
3 files changed, 8 insertions, 7 deletions
diff --git a/pod/perlapi.pod b/pod/perlapi.pod
index f51bd96bfb..02e5f2686f 100644
--- a/pod/perlapi.pod
+++ b/pod/perlapi.pod
@@ -354,13 +354,14 @@ Found in file av.c
=item get_av
X<get_av>
-Returns the AV of the specified Perl array. If C<create> is set and the
-Perl variable does not exist then it will be created. If C<create> is not
-set and the variable does not exist then NULL is returned.
+Returns the AV of the specified Perl array. C<flags> are passed to
+C<gv_fetchpv>. If C<GV_ADD> is set and the
+Perl variable does not exist then it will be created. If C<flags> is zero
+and the variable does not exist then NULL is returned.
NOTE: the perl_ form of this function is deprecated.
- AV* get_av(const char* name, I32 create)
+ AV* get_av(const char *name, I32 flags)
=for hackers
Found in file perl.c
diff --git a/pod/perlembed.pod b/pod/perlembed.pod
index 2466531255..a2b76fdc28 100644
--- a/pod/perlembed.pod
+++ b/pod/perlembed.pod
@@ -480,7 +480,7 @@ been wrapped here):
my_eval_sv(command, TRUE);
SvREFCNT_dec(command);
- *match_list = get_av("array", FALSE);
+ *match_list = get_av("array", 0);
num_matches = av_len(*match_list) + 1; /** assume $[ is 0 **/
return num_matches;
diff --git a/pod/perlguts.pod b/pod/perlguts.pod
index 6d64c1352c..8231592db0 100644
--- a/pod/perlguts.pod
+++ b/pod/perlguts.pod
@@ -367,7 +367,7 @@ then nothing is done.
If you know the name of an array variable, you can get a pointer to its AV
by using the following:
- AV* get_av("package::varname", FALSE);
+ AV* get_av("package::varname", 0);
This returns NULL if the variable does not exist.
@@ -668,7 +668,7 @@ To create a new Perl variable with an undef value which can be accessed from
your Perl script, use the following routines, depending on the variable type.
SV* get_sv("package::varname", TRUE);
- AV* get_av("package::varname", TRUE);
+ AV* get_av("package::varname", GV_ADD);
HV* get_hv("package::varname", GV_ADD);
Notice the use of TRUE as the second parameter. The new variable can now