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_
cop_line $line
cop_warnings $warningsix
EOT
- $stash->bytecode;
}
sub B::PMOP::bytecode {
$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]");
}
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);
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 */