summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-06-03 14:38:09 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-06-03 14:38:09 +0000
commitd653c6f5cfd47fd6d82c68d8013461da4731be40 (patch)
tree28b032880a04f21e0886e129d329f25c31c2d06b /perl.c
parent64ca3a6502a07a2652bb713108527be0e9066745 (diff)
parent63caf6080702341afbd2806f3d0b2bb9ccae687d (diff)
downloadperl-d653c6f5cfd47fd6d82c68d8013461da4731be40.tar.gz
Integrate with Sarathy.
p4raw-id: //depot/cfgperl@6196
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/perl.c b/perl.c
index 8b970a2e23..20ab7af63a 100644
--- a/perl.c
+++ b/perl.c
@@ -600,9 +600,14 @@ perl_destruct(pTHXx)
if (!specialWARN(PL_compiling.cop_warnings))
SvREFCNT_dec(PL_compiling.cop_warnings);
PL_compiling.cop_warnings = Nullsv;
-#ifndef USE_ITHREADS
+#ifdef USE_ITHREADS
+ Safefree(CopFILE(&PL_compiling));
+ CopFILE(&PL_compiling) = Nullch;
+ Safefree(CopSTASHPV(&PL_compiling));
+#else
SvREFCNT_dec(CopFILEGV(&PL_compiling));
- CopFILEGV_set(&PL_compiling, Nullgv);
+ CopFILEGV(&PL_compiling) = Nullgv;
+ /* cop_stash is not refcounted */
#endif
/* Prepare to destruct main symbol table. */
@@ -2515,6 +2520,11 @@ S_open_script(pTHX_ char *scriptname, bool dosearch, SV *sv, int *fdscript)
}
}
+#ifdef USE_ITHREADS
+ Safefree(CopFILE(PL_curcop));
+#else
+ SvREFCNT_dec(CopFILEGV(PL_curcop));
+#endif
CopFILE_set(PL_curcop, PL_origfilename);
if (strEQ(PL_origfilename,"-"))
scriptname = "";