summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-01-21 12:12:12 +0000
committerNicholas Clark <nick@ccl4.org>2009-01-21 17:09:11 +0000
commit6673a63c63e2a65dbfcc835d6499cc97c449c67b (patch)
treeec84eaad20d1a2dae1ca297ecf1d19de05feff1f /perl.c
parent2b393bf410d9f1bf0b80132c4e8b5d6707a139f8 (diff)
downloadperl-6673a63c63e2a65dbfcc835d6499cc97c449c67b.tar.gz
Update the documentation of get_hv() 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 'perl.c')
-rw-r--r--perl.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/perl.c b/perl.c
index d02514ca7a..7e56ef538c 100644
--- a/perl.c
+++ b/perl.c
@@ -2466,21 +2466,22 @@ Perl_get_av(pTHX_ const char *name, I32 create)
=for apidoc p||get_hv
-Returns the HV of the specified Perl hash. 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 HV of the specified Perl hash. 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.
=cut
*/
HV*
-Perl_get_hv(pTHX_ const char *name, I32 create)
+Perl_get_hv(pTHX_ const char *name, I32 flags)
{
- GV* const gv = gv_fetchpv(name, create, SVt_PVHV);
+ GV* const gv = gv_fetchpv(name, flags, SVt_PVHV);
PERL_ARGS_ASSERT_GET_HV;
- if (create)
+ if (flags)
return GvHVn(gv);
if (gv)
return GvHV(gv);