summaryrefslogtreecommitdiff
path: root/cop.h
diff options
context:
space:
mode:
authorPerl 5 Porters <perl5-porters@africa.nicoh.com>1996-07-05 05:01:26 +0000
committerCharles Bailey <bailey@genetics.upenn.edu>1996-07-05 05:01:26 +0000
commit03d5e78e23137ad2106be45fc1159128bae29695 (patch)
treeb9fe1241c0fc5d5a3be8be9b3d39394b54cafbb0 /cop.h
parent9193ea202a5ecd4b4499827df9feee2bd976bc17 (diff)
downloadperl-03d5e78e23137ad2106be45fc1159128bae29695.tar.gz
perl 5.003_01: cop.h
Increment refcount on @_ when passed through to another sub, so it's not freed twiceon return.
Diffstat (limited to 'cop.h')
-rw-r--r--cop.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/cop.h b/cop.h
index b5033090d9..bea47c4c6a 100644
--- a/cop.h
+++ b/cop.h
@@ -52,6 +52,9 @@ struct block_sub {
} \
if (cx->blk_sub.cv) { \
if (!(CvDEPTH(cx->blk_sub.cv) = cx->blk_sub.olddepth)) { \
+ if (cx->blk_sub.hasargs) { \
+ SvREFCNT_inc((SV*)cx->blk_sub.argarray); \
+ } \
SvREFCNT_dec((SV*)cx->blk_sub.cv); \
} \
}