summaryrefslogtreecommitdiff
path: root/pod/perlguts.pod
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-01-21 15:03:03 +0000
committerNicholas Clark <nick@ccl4.org>2009-01-21 17:09:11 +0000
commit64ace3f88f559d007c0150d9b048b1db32380208 (patch)
tree042e7da9dbe9f7d2a0291fe3763130f50198e559 /pod/perlguts.pod
parentcbfd0a879b2bf2ade4a309e6d56c08ba19f320e1 (diff)
downloadperl-64ace3f88f559d007c0150d9b048b1db32380208.tar.gz
Update the documentation of get_sv() to note that it calls Perl_gv_fetchpv(),
and hence the 'create' argument is actually 'flags'. Fix core code and documentation that used TRUE or FALSE to use 0 or GV_ADD.
Diffstat (limited to 'pod/perlguts.pod')
-rw-r--r--pod/perlguts.pod6
1 files changed, 3 insertions, 3 deletions
diff --git a/pod/perlguts.pod b/pod/perlguts.pod
index 8231592db0..6408e87422 100644
--- a/pod/perlguts.pod
+++ b/pod/perlguts.pod
@@ -191,7 +191,7 @@ have "magic". See L<Magic Virtual Tables> later in this document.
If you know the name of a scalar variable, you can get a pointer to its SV
by using the following:
- SV* get_sv("package::varname", FALSE);
+ SV* get_sv("package::varname", 0);
This returns NULL if the variable does not exist.
@@ -667,7 +667,7 @@ to write:
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);
+ SV* get_sv("package::varname", GV_ADD);
AV* get_av("package::varname", GV_ADD);
HV* get_hv("package::varname", GV_ADD);
@@ -878,7 +878,7 @@ following code:
extern int dberror;
extern char *dberror_list;
- SV* sv = get_sv("dberror", TRUE);
+ SV* sv = get_sv("dberror", GV_ADD);
sv_setiv(sv, (IV) dberror);
sv_setpv(sv, dberror_list[dberror]);
SvIOK_on(sv);