summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-09-19 21:30:18 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-09-19 21:30:18 +0000
commitd8b46c1bb1e2856c8ae13cfa7f0b032537c8f918 (patch)
treefdb10b355d222b753f3ee2df6dc95f0d7ade8750 /pp.c
parentb3f4d6747e1f3080fd7541acf443f6376f42f81c (diff)
downloadperl-d8b46c1bb1e2856c8ae13cfa7f0b032537c8f918.tar.gz
avoid clearing @_ at all for faster subroutine calls; fix bugs
in passing around references to @_, eg C<sub foo { \@_ }>; add tests for the same p4raw-id: //depot/perl@4195
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/pp.c b/pp.c
index 07bb33d367..6746aa5994 100644
--- a/pp.c
+++ b/pp.c
@@ -530,6 +530,12 @@ S_refto(pTHX_ SV *sv)
else
(void)SvREFCNT_inc(sv);
}
+ else if (SvTYPE(sv) == SVt_PVAV) {
+ if (!AvREAL((AV*)sv) && AvREIFY((AV*)sv))
+ av_reify((AV*)sv);
+ SvTEMP_off(sv);
+ (void)SvREFCNT_inc(sv);
+ }
else if (SvPADTMP(sv))
sv = newSVsv(sv);
else {