summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-11-11 10:32:54 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-11-11 10:32:54 +0000
commit11faa288e292c27cb2ddc4ccdc483b523d26ce19 (patch)
treecdd7a04e7b75f54261ca8d31b5dbd98d7053dd10 /pp_ctl.c
parent57843af05bc7863df9b9bfb6b37e3a29d08532a9 (diff)
downloadperl-11faa288e292c27cb2ddc4ccdc483b523d26ce19.tar.gz
avoid stash pointers in optree under USE_ITHREADS
p4raw-id: //depot/perl@4546
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 301d1bcbfb..22c83aa8d0 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -792,7 +792,7 @@ PP(pp_sort)
kid = kUNOP->op_first; /* pass rv2gv */
kid = kUNOP->op_first; /* pass leave */
PL_sortcop = kid->op_next;
- stash = PL_curcop->cop_stash;
+ stash = CopSTASH(PL_curcop);
}
else {
cv = sv_2cv(*++MARK, &stash, &gv, 0);
@@ -822,7 +822,7 @@ PP(pp_sort)
}
else {
PL_sortcop = Nullop;
- stash = PL_curcop->cop_stash;
+ stash = CopSTASH(PL_curcop);
}
up = myorigmark + 1;
@@ -1428,8 +1428,8 @@ PP(pp_caller)
cx = &ccstack[dbcxix];
}
+ hv = CopSTASH(cx->blk_oldcop);
if (GIMME != G_ARRAY) {
- hv = cx->blk_oldcop->cop_stash;
if (!hv)
PUSHs(&PL_sv_undef);
else {
@@ -1440,7 +1440,6 @@ PP(pp_caller)
RETURN;
}
- hv = cx->blk_oldcop->cop_stash;
if (!hv)
PUSHs(&PL_sv_undef);
else
@@ -1480,7 +1479,7 @@ PP(pp_caller)
PUSHs(&PL_sv_undef);
}
if (CxTYPE(cx) == CXt_SUB && cx->blk_sub.hasargs
- && PL_curcop->cop_stash == PL_debstash)
+ && CopSTASH(PL_curcop) == PL_debstash)
{
AV *ary = cx->blk_sub.argarray;
int off = AvARRAY(ary) - AvALLOC(ary);
@@ -1516,7 +1515,7 @@ PP(pp_reset)
tmps = "";
else
tmps = POPpx;
- sv_reset(tmps, PL_curcop->cop_stash);
+ sv_reset(tmps, CopSTASH(PL_curcop));
PUSHs(&PL_sv_yes);
RETURN;
}
@@ -2488,8 +2487,8 @@ Perl_sv_compile_2op(pTHX_ SV *sv, OP** startop, char *code, AV** avp)
/* switch to eval mode */
if (PL_curcop == &PL_compiling) {
- SAVESPTR(PL_compiling.cop_stash);
- PL_compiling.cop_stash = PL_curstash;
+ SAVECOPSTASH(&PL_compiling);
+ CopSTASH_set(&PL_compiling, PL_curstash);
}
SAVECOPFILE(&PL_compiling);
SAVECOPLINE(&PL_compiling);
@@ -2605,7 +2604,7 @@ S_doeval(pTHX_ int gimme, OP** startop)
/* make sure we compile in the right package */
- newstash = PL_curcop->cop_stash;
+ newstash = CopSTASH(PL_curcop);
if (PL_curstash != newstash) {
SAVESPTR(PL_curstash);
PL_curstash = newstash;