From 562d31b88ec866a9804ab829f5cc992f3ccf2c2f Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Tue, 7 Dec 1999 23:16:21 +0000 Subject: [PATCH] typos in change#4546 p4raw-link: @4546 on //depot/perl: 11faa288e292c27cb2ddc4ccdc483b523d26ce19 p4raw-id: //depot/perl@4662 --- ext/B/B.xs | 5 ++--- ext/B/B/Bytecode.pm | 1 - ext/B/B/C.pm | 2 +- sv.c | 16 +++++++++++++++- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/ext/B/B.xs b/ext/B/B.xs index 7d0fc74..260c0c7 100644 --- a/ext/B/B.xs +++ b/ext/B/B.xs @@ -679,9 +679,8 @@ PMOP_precomp(o) if (rx) sv_setpvn(ST(0), rx->precomp, rx->prelen); -#define SVOP_sv(o) o->op_sv -#define SVOP_gv(o) ((SvTYPE(o->op_sv) == SVt_PVGV) \ - ? (GV*)o->op_sv : Nullgv) +#define SVOP_sv(o) cSVOPx_sv(o) +#define SVOP_gv(o) cGVOPx_gv(o) MODULE = B PACKAGE = B::SVOP PREFIX = SVOP_ diff --git a/ext/B/B/Bytecode.pm b/ext/B/B/Bytecode.pm index c085071..cb061f3 100644 --- a/ext/B/B/Bytecode.pm +++ b/ext/B/B/Bytecode.pm @@ -299,7 +299,6 @@ cop_arybase %d cop_line $line cop_warnings $warningsix EOT - $stash->bytecode; } sub B::PMOP::bytecode { diff --git a/ext/B/B/C.pm b/ext/B/B/C.pm index f860744..3feda2c 100644 --- a/ext/B/B/C.pm +++ b/ext/B/B/C.pm @@ -302,7 +302,7 @@ sub B::COP::save { $op->arybase, $op->line)); my $copix = $copsect->index; $init->add(sprintf("CopFILE_set(&cop_list[%d], %s);", $copix, cstring($op->file)), - sprintf("CopSTASHPV_set(&cop_list[%d], %s);", $copix, cstring($op->stashpv)); + sprintf("CopSTASHPV_set(&cop_list[%d], %s);", $copix, cstring($op->stashpv))); savesym($op, "(OP*)&cop_list[$copix]"); } diff --git a/sv.c b/sv.c index 933151c..fa32878 100644 --- a/sv.c +++ b/sv.c @@ -6449,7 +6449,10 @@ Perl_ss_dup(pTHX_ PerlInterpreter *proto_perl) break; case SAVEt_FREEOP: ptr = POPPTR(ss,ix); - TOPPTR(nss,ix) = ptr; + if (ptr && (((OP*)ptr)->op_private & OPpREFCOUNTED)) + TOPPTR(nss,ix) = any_dup(ptr, proto_perl); + else + TOPPTR(nss,ix) = Nullop; break; case SAVEt_FREEPV: c = (char*)POPPTR(ss,ix); @@ -6594,6 +6597,17 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags, SV *sv; SV **svp; PerlInterpreter *my_perl = (PerlInterpreter*)PerlMem_malloc(sizeof(PerlInterpreter)); + PERL_SET_INTERP(my_perl); + +# ifdef DEBUGGING + memset(my_perl, 0xab, sizeof(PerlInterpreter)); + PL_markstack = 0; + PL_scopestack = 0; + PL_savestack = 0; + PL_retstack = 0; +# else /* !DEBUGGING */ + Zero(my_perl, 1, PerlInterpreter); +# endif /* DEBUGGING */ #endif /* PERL_IMPLICIT_SYS */ /* arena roots */ -- 2.7.4