typos in change#4546
authorGurusamy Sarathy <gsar@cpan.org>
Tue, 7 Dec 1999 23:16:21 +0000 (23:16 +0000)
committerGurusamy Sarathy <gsar@cpan.org>
Tue, 7 Dec 1999 23:16:21 +0000 (23:16 +0000)
p4raw-link: @4546 on //depot/perl: 11faa288e292c27cb2ddc4ccdc483b523d26ce19

p4raw-id: //depot/perl@4662

ext/B/B.xs
ext/B/B/Bytecode.pm
ext/B/B/C.pm
sv.c

index 7d0fc74..260c0c7 100644 (file)
@@ -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_
 
index c085071..cb061f3 100644 (file)
@@ -299,7 +299,6 @@ cop_arybase %d
 cop_line $line
 cop_warnings $warningsix
 EOT
-    $stash->bytecode;
 }
 
 sub B::PMOP::bytecode {
index f860744..3feda2c 100644 (file)
@@ -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 (file)
--- 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 */