summaryrefslogtreecommitdiff
path: root/scope.c
diff options
context:
space:
mode:
authorDave Mitchell <davem@fdisolutions.com>2002-09-26 00:40:23 +0100
committerhv <hv@crypt.org>2002-10-02 12:55:29 +0000
commitdd2155a49b710f23bc6d72169e5b1d71d8b3aa03 (patch)
tree7fd660a6b57a1893830c91b566975bbe7e085966 /scope.c
parent78c9d76351ef2d0f7047846bbf29e303753d3fda (diff)
downloadperl-dd2155a49b710f23bc6d72169e5b1d71d8b3aa03.tar.gz
move all pad-related code to its own src file
Message-ID: <20020925234023.A20044@fdgroup.com> p4raw-id: //depot/perl@17953
Diffstat (limited to 'scope.c')
-rw-r--r--scope.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/scope.c b/scope.c
index 673b64cf8b..a53c1c53b0 100644
--- a/scope.c
+++ b/scope.c
@@ -868,6 +868,15 @@ Perl_leave_scope(pTHX_ I32 base)
case SAVEt_CLEARSV:
ptr = (void*)&PL_curpad[SSPOPLONG];
sv = *(SV**)ptr;
+
+ DEBUG_Xv(PerlIO_printf(Perl_debug_log,
+ "Pad [0x%"UVxf"] clearsv: %ld sv=0x%"UVxf"<%"IVdf"> %s\n",
+ PTR2UV(PL_curpad), (long)((SV **)ptr-PL_curpad),
+ PTR2UV(sv),
+ (IV)SvREFCNT(sv),
+ (SvREFCNT(sv) <= 1 && !SvOBJECT(sv)) ? "clear" : "abandon"
+ ));
+
/* Can clear pad variable in place? */
if (SvREFCNT(sv) <= 1 && !SvOBJECT(sv)) {
/*
@@ -1000,7 +1009,7 @@ Perl_leave_scope(pTHX_ I32 base)
PADOFFSET off = (PADOFFSET)SSPOPLONG;
ptr = SSPOPPTR;
if (ptr)
- ((SV**)ptr)[off] = (SV*)SSPOPPTR;
+ ((PAD)ptr)[off] = (SV*)SSPOPPTR;
}
break;
default: