From: Luke Ross Date: Tue, 30 Sep 2008 22:41:50 +0000 (+0100) Subject: Re: [perl #59280] perlbug AutoReply: PUSH on tied array gives incorrect context to... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5658d0a991e0934aa37c0856ad0548d1996b4084;p=p5sagit%2Fp5-mst-13.2.git 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" Message-ID: <970a62710809301441v1d8d1877tfc30d7b91cd4dc1a@mail.gmail.com> p4raw-id: //depot/perl@34908 --- diff --git a/pp.c b/pp.c index 166c315..0fbc6e4 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; }