diff options
Diffstat (limited to 'pod')
-rw-r--r-- | pod/perlapi.pod | 9 | ||||
-rw-r--r-- | pod/perlguts.pod | 4 |
2 files changed, 7 insertions, 6 deletions
diff --git a/pod/perlapi.pod b/pod/perlapi.pod index 8c3e6d6bb6..f51bd96bfb 100644 --- a/pod/perlapi.pod +++ b/pod/perlapi.pod @@ -1484,13 +1484,14 @@ Found in file handy.h =item get_hv X<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. NOTE: the perl_ form of this function is deprecated. - HV* get_hv(const char* name, I32 create) + HV* get_hv(const char *name, I32 flags) =for hackers Found in file perl.c diff --git a/pod/perlguts.pod b/pod/perlguts.pod index 3ce60d0599..6d64c1352c 100644 --- a/pod/perlguts.pod +++ b/pod/perlguts.pod @@ -442,7 +442,7 @@ specified below. If you know the name of a hash variable, you can get a pointer to its HV by using the following: - HV* get_hv("package::varname", FALSE); + HV* get_hv("package::varname", 0); This returns NULL if the variable does not exist. @@ -669,7 +669,7 @@ your Perl script, use the following routines, depending on the variable type. SV* get_sv("package::varname", TRUE); AV* get_av("package::varname", TRUE); - HV* get_hv("package::varname", TRUE); + HV* get_hv("package::varname", GV_ADD); Notice the use of TRUE as the second parameter. The new variable can now be set, using the routines appropriate to the data type. |