summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-11-21 18:28:22 +0000
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-11-21 18:28:22 +0000
commit54b9620dd49f76536ba0792f6f471615a414bd6a (patch)
tree0f7080854c047d90b09822aec3b81dd2fcbabd89 /pp.c
parentff2faa2b5a0809a5124aa90fc1d07503e49a73fb (diff)
downloadperl-54b9620dd49f76536ba0792f6f471615a414bd6a.tar.gz
$_ is now per-thread (rather a lot of changes). Only tested under
*-linux-thread at the moment. p4raw-id: //depot/perl@274
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/pp.c b/pp.c
index 5ed3e989ce..8fbe61de71 100644
--- a/pp.c
+++ b/pp.c
@@ -590,7 +590,7 @@ PP(pp_trans)
if (op->op_flags & OPf_STACKED)
sv = POPs;
else {
- sv = GvSV(defgv);
+ sv = DEFSV;
EXTEND(SP,1);
}
TARG = sv_newmortal();
@@ -2714,7 +2714,7 @@ PP(pp_reverse)
if (SP - MARK > 1)
do_join(TARG, &sv_no, MARK, SP);
else
- sv_setsv(TARG, (SP > MARK) ? *SP : GvSV(defgv));
+ sv_setsv(TARG, (SP > MARK) ? *SP : DEFSV);
up = SvPV_force(TARG, len);
if (len > 1) {
down = SvPVX(TARG) + len - 1;
@@ -4310,14 +4310,11 @@ PP(pp_threadsv)
{
djSP;
#ifdef USE_THREADS
- SV **svp = av_fetch(thr->magicals, op->op_targ, FALSE);
- if (!svp)
- croak("panic: pp_threadsv");
EXTEND(sp, 1);
if (op->op_private & OPpLVAL_INTRO)
- PUSHs(save_svref(svp));
+ PUSHs(*save_threadsv(op->op_targ));
else
- PUSHs(*svp);
+ PUSHs(*av_fetch(thr->threadsv, op->op_targ, FALSE));
#else
DIE("tried to access per-thread data in non-threaded perl");
#endif /* USE_THREADS */