summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorRuslan Zakirov <ruz@bestpractical.com>2010-05-03 23:08:46 +0200
committerVincent Pit <vince@profvince.com>2010-05-03 23:08:46 +0200
commit538f5756c002f0583190831238bbf6bd54855cdc (patch)
treef1b6fdca83e77fcc40c6c73b5ec944a7b7703cf3 /pp.c
parent6550424581c83583e72aa799a12d2a2e68d9e5f1 (diff)
downloadperl-538f5756c002f0583190831238bbf6bd54855cdc.tar.gz
shift; optimization
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pp.c b/pp.c
index 3cc8869497..e998e211e9 100644
--- a/pp.c
+++ b/pp.c
@@ -5326,7 +5326,8 @@ PP(pp_shift)
{
dVAR;
dSP;
- AV * const av = MUTABLE_AV(POPs);
+ AV * const av = PL_op->op_flags & OPf_SPECIAL
+ ? MUTABLE_AV(GvAV(PL_defgv)) : MUTABLE_AV(POPs);
SV * const sv = PL_op->op_type == OP_SHIFT ? av_shift(av) : av_pop(av);
EXTEND(SP, 1);
assert (sv);