summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Ross <lukeross@gmail.com>2008-09-30 23:41:50 +0100
committerSteve Peters <steve@fisharerojo.org>2008-11-25 06:48:36 +0000
commit5658d0a991e0934aa37c0856ad0548d1996b4084 (patch)
tree4f96f926692c1624ea2164ef707e1a5d893e5a4a
parente91684bfbb744fa7e8fdd1131386e3066e5e051b (diff)
downloadperl-5658d0a991e0934aa37c0856ad0548d1996b4084.tar.gz
Re: [perl #59280] perlbug AutoReply: PUSH on tied array gives incorrect context to method and can result in needless calls to FETCHSIZE
From: "Luke Ross" <lukeross@gmail.com> Message-ID: <970a62710809301441v1d8d1877tfc30d7b91cd4dc1a@mail.gmail.com> p4raw-id: //depot/perl@34908
-rw-r--r--pp.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/pp.c b/pp.c
index 166c315d8f..0fbc6e48e8 100644
--- a/pp.c
+++ b/pp.c
@@ -4523,7 +4523,9 @@ PP(pp_push)
LEAVE;
SPAGAIN;
SP = ORIGMARK;
- PUSHi( AvFILL(ary) + 1 );
+ if (GIMME_V != G_VOID) {
+ PUSHi( AvFILL(ary) + 1 );
+ }
}
else {
PL_delaymagic = DM_DELAY;
@@ -4581,7 +4583,9 @@ PP(pp_unshift)
}
}
SP = ORIGMARK;
- PUSHi( AvFILL(ary) + 1 );
+ if (GIMME_V != G_VOID) {
+ PUSHi( AvFILL(ary) + 1 );
+ }
RETURN;
}