Add a Perl equivalent to av_delete().
Shlomi Fish [Sat, 15 May 2010 19:13:59 +0000 (22:13 +0300)]
Signed-off-by: David Golden <dagolden@cpan.org>

av.c

diff --git a/av.c b/av.c
index 095147a..f915fef 100644 (file)
--- a/av.c
+++ b/av.c
@@ -791,7 +791,9 @@ Perl_av_fill(pTHX_ register AV *av, I32 fill)
 
 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.
+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
 */