summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-06-05 14:20:51 +0000
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-06-05 14:20:51 +0000
commite858de61083066071eb1526df39bdaa094032c61 (patch)
treea59a60b162edf35b5557f553d4812553b75a996d /op.c
parent5196be3eab7cb5c37d1fce858e95874c8439e54f (diff)
downloadperl-e858de61083066071eb1526df39bdaa094032c61.tar.gz
More fixups for thrperl integration.
p4raw-id: //depot/perl@27
Diffstat (limited to 'op.c')
-rw-r--r--op.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/op.c b/op.c
index 45b74002e8..30211544e9 100644
--- a/op.c
+++ b/op.c
@@ -2991,11 +2991,15 @@ CV *cv;
{
dTHR;
#ifdef USE_THREADS
- MUTEX_DESTROY(CvMUTEXP(cv));
- Safefree(CvMUTEXP(cv));
+ if (CvMUTEXP(cv)) {
+ MUTEX_DESTROY(CvMUTEXP(cv));
+ Safefree(CvMUTEXP(cv));
+ CvMUTEXP(cv) = 0;
+ }
if (CvCONDP(cv)) {
COND_DESTROY(CvCONDP(cv));
Safefree(CvCONDP(cv));
+ CvCONDP(cv) = 0;
}
#endif /* USE_THREADS */
@@ -3284,8 +3288,8 @@ CV* cv;
if (type == OP_CONST)
sv = cSVOPo->op_sv;
else if (type == OP_PADSV) {
- AV* pad = (AV*)(AvARRAY(CvPADLIST(cv))[1]);
- sv = pad ? AvARRAY(pad)[o->op_targ] : Nullsv;
+ AV* padav = (AV*)(AvARRAY(CvPADLIST(cv))[1]);
+ sv = padav ? AvARRAY(padav)[o->op_targ] : Nullsv;
if (!sv || (!SvREADONLY(sv) && SvREFCNT(sv) > 1))
return Nullsv;
}
@@ -4701,7 +4705,7 @@ OP *o;
o2 = newUNOP(OP_REFGEN, 0, kid);
o2->op_sibling = kid->op_sibling;
kid->op_sibling = 0;
- prev->op_sibling = o;
+ prev->op_sibling = o2;
}
break;
default: goto oops;
@@ -4824,7 +4828,7 @@ register OP* o;
OP* pop = o->op_next->op_next;
IV i;
if (pop->op_type == OP_CONST &&
- (o = pop->op_next) &&
+ (op = pop->op_next) &&
pop->op_next->op_type == OP_AELEM &&
!(pop->op_next->op_private &
(OPpLVAL_INTRO|OPpLVAL_DEFER|OPpDEREF)) &&