In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/3025a2e42cd703f48878ec60605f8960d5732efb?hp=582bd8796b98142a11f99996b4e934a363b2cac0>

- Log -----------------------------------------------------------------
commit 3025a2e42cd703f48878ec60605f8960d5732efb
Author: Chip Salzenberg <[email protected]>
Date:   Thu Oct 14 17:50:10 2010 -0700

    Document that av_delete and hv_delete make their return values mortal.
-----------------------------------------------------------------------

Summary of changes:
 av.c |   10 +++++-----
 hv.c |   17 +++++++++--------
 2 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/av.c b/av.c
index b061828..d6db6bf 100644
--- a/av.c
+++ b/av.c
@@ -791,11 +791,11 @@ Perl_av_fill(pTHX_ register AV *av, I32 fill)
 /*
 =for apidoc av_delete
 
-Deletes the element indexed by C<key> from the array.  Returns the
-deleted element. If C<flags> equals C<G_DISCARD>, the element is freed
-and null is returned. Perl equivalent: C<my $elem = delete($myarray[$idx]);>
-for the non-C<G_DISCARD> version and a void-context C<delete($myarray[$idx]);>
-for the C<G_DISCARD> version.
+Deletes the element indexed by C<key> from the array, makes the element mortal,
+and returns it.  If C<flags> equals C<G_DISCARD>, the element is freed and null
+is returned.  Perl equivalent: C<my $elem = delete($myarray[$idx]);> for the
+non-C<G_DISCARD> version and a void-context C<delete($myarray[$idx]);> for the
+C<G_DISCARD> version.
 
 =cut
 */
diff --git a/hv.c b/hv.c
index 5482306..591865f 100644
--- a/hv.c
+++ b/hv.c
@@ -879,17 +879,18 @@ Perl_hv_scalar(pTHX_ HV *hv)
 /*
 =for apidoc hv_delete
 
-Deletes a key/value pair in the hash.  The value SV is removed from the
-hash and returned to the caller.  The C<klen> is the length of the key.
-The C<flags> value will normally be zero; if set to G_DISCARD then NULL
-will be returned.
+Deletes a key/value pair in the hash.  The value's SV is removed from the
+hash, made mortal, and returned to the caller.  The C<klen> is the length of
+the key.  The C<flags> value will normally be zero; if set to G_DISCARD then
+NULL will be returned.  NULL will also be returned if the key is not found.
 
 =for apidoc hv_delete_ent
 
-Deletes a key/value pair in the hash.  The value SV is removed from the
-hash and returned to the caller.  The C<flags> value will normally be zero;
-if set to G_DISCARD then NULL will be returned.  C<hash> can be a valid
-precomputed hash value, or 0 to ask for it to be computed.
+Deletes a key/value pair in the hash.  The value SV is removed from the hash,
+made mortal, and returned to the caller.  The C<flags> value will normally be
+zero; if set to G_DISCARD then NULL will be returned.  NULL will also be
+returned if the key is not found.  C<hash> can be a valid precomputed hash
+value, or 0 to ask for it to be computed.
 
 =cut
 */

--
Perl5 Master Repository

Reply via email to