summaryrefslogtreecommitdiff
path: root/pod/perlembed.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/perlembed.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/perlembed.pod')
-rw-r--r--pod/perlembed.pod8
1 files changed, 4 insertions, 4 deletions
diff --git a/pod/perlembed.pod b/pod/perlembed.pod
index a2b76fdc28..39364eb429 100644
--- a/pod/perlembed.pod
+++ b/pod/perlembed.pod
@@ -325,15 +325,15 @@ the first, a C<float> from the second, and a C<char *> from the third.
/** Treat $a as an integer **/
eval_pv("$a = 3; $a **= 2", TRUE);
- printf("a = %d\n", SvIV(get_sv("a", FALSE)));
+ printf("a = %d\n", SvIV(get_sv("a", 0)));
/** Treat $a as a float **/
eval_pv("$a = 3.14; $a **= 2", TRUE);
- printf("a = %f\n", SvNV(get_sv("a", FALSE)));
+ printf("a = %f\n", SvNV(get_sv("a", 0)));
/** Treat $a as a string **/
eval_pv("$a = 'rekcaH lreP rehtonA tsuJ'; $a = reverse($a);", TRUE);
- printf("a = %s\n", SvPV_nolen(get_sv("a", FALSE)));
+ printf("a = %s\n", SvPV_nolen(get_sv("a", 0)));
perl_destruct(my_perl);
perl_free(my_perl);
@@ -457,7 +457,7 @@ been wrapped here):
retval = my_eval_sv(command, TRUE);
SvREFCNT_dec(command);
- *string = get_sv("string", FALSE);
+ *string = get_sv("string", 0);
return SvIV(retval);
}