diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-09-19 21:30:18 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-09-19 21:30:18 +0000 |
commit | d8b46c1bb1e2856c8ae13cfa7f0b032537c8f918 (patch) | |
tree | fdb10b355d222b753f3ee2df6dc95f0d7ade8750 /pp.c | |
parent | b3f4d6747e1f3080fd7541acf443f6376f42f81c (diff) | |
download | perl-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.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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 { |