summaryrefslogtreecommitdiff
path: root/hv.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2011-05-11 16:50:45 +0100
committerDavid Mitchell <davem@iabyn.com>2011-05-19 14:49:44 +0100
commitc2217cd33590ef654504deb38dcf3378dcdc095c (patch)
treedbd25204113acaf3a500b3434a8d383211835aee /hv.c
parent00a1a6438090b41d961c8127cc4e10d84fa70977 (diff)
downloadperl-c2217cd33590ef654504deb38dcf3378dcdc095c.tar.gz
improve api entries for hv_clear() and hv_undef()
The =apidoc entries for hv_clear() and hv_undef() were a bit spartan. Make it clearer what the two functions actually do, and the relationship between them.
Diffstat (limited to 'hv.c')
-rw-r--r--hv.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/hv.c b/hv.c
index 785a3066e0..f9eda830ec 100644
--- a/hv.c
+++ b/hv.c
@@ -1519,7 +1519,8 @@ Perl_hv_delayfree_ent(pTHX_ HV *hv, register HE *entry)
/*
=for apidoc hv_clear
-Clears a hash, making it empty.
+Frees the all the elements of a hash, leaving it empty.
+The XS equivalent of %hash = (). See also L</hv_undef>.
=cut
*/
@@ -1725,7 +1726,11 @@ Perl_hfree_next_entry(pTHX_ HV *hv, STRLEN *indexp)
/*
=for apidoc hv_undef
-Undefines the hash.
+Undefines the hash. The XS equivalent of undef(%hash).
+
+As well as freeing all the elements of the hash (like hv_clear()), this
+also frees any auxiliary data and storage associated with the hash.
+See also L</hv_clear>.
=cut
*/