summaryrefslogtreecommitdiff
path: root/pod/perlguts.pod
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2007-01-25 20:57:56 +0000
committerNicholas Clark <nick@ccl4.org>2007-01-25 20:57:56 +0000
commitda51bb9b4f7f527464b5e38aca8bcb956de1bbbc (patch)
treef2f952634f7d10137a8e0c223426969a64d76ff6 /pod/perlguts.pod
parentede8ac17cc8980652fa00e4d3b33ce031d6bbd24 (diff)
downloadperl-da51bb9b4f7f527464b5e38aca8bcb956de1bbbc.tar.gz
The last parameter to gv_stashpv/gv_stashpvn/gv_stashsv is a bitmask
of flags, not a boolean, so correct the documenation and callers. p4raw-id: //depot/perl@29977
Diffstat (limited to 'pod/perlguts.pod')
-rw-r--r--pod/perlguts.pod8
1 files changed, 4 insertions, 4 deletions
diff --git a/pod/perlguts.pod b/pod/perlguts.pod
index bbf8742d97..36a0ea1234 100644
--- a/pod/perlguts.pod
+++ b/pod/perlguts.pod
@@ -814,12 +814,12 @@ in the stash C<Baz::> in C<Bar::>'s stash.
To get the stash pointer for a particular package, use the function:
- HV* gv_stashpv(const char* name, I32 create)
- HV* gv_stashsv(SV*, I32 create)
+ HV* gv_stashpv(const char* name, I32 flags)
+ HV* gv_stashsv(SV*, I32 flags)
The first function takes a literal string, the second uses the string stored
in the SV. Remember that a stash is just a hash table, so you get back an
-C<HV*>. The C<create> flag will create a new package if it is set.
+C<HV*>. The C<flags> flag will create a new package if it is set to GV_ADD.
The name that C<gv_stash*v> wants is the name of the package whose symbol table
you want. The default package is called C<main>. If you have multiply nested
@@ -1187,7 +1187,7 @@ to do this.
CODE:
hash = newHV();
tie = newRV_noinc((SV*)newHV());
- stash = gv_stashpv("MyTie", TRUE);
+ stash = gv_stashpv("MyTie", GV_ADD);
sv_bless(tie, stash);
hv_magic(hash, (GV*)tie, PERL_MAGIC_tied);
RETVAL = newRV_noinc(hash);