summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorSpider Boardman <spider@orb.nashua.nh.us>2000-09-07 21:30:27 -0400
committerJarkko Hietaniemi <jhi@iki.fi>2000-09-08 14:11:06 +0000
commit3049cdab56e66ab4bbd72677e85fd044945cc99d (patch)
treeb003830f61a5839b10e7f3048e106ac91c52072b /op.c
parentb921b3575ec9dffff553238ecd51875883f2707e (diff)
downloadperl-3049cdab56e66ab4bbd72677e85fd044945cc99d.tar.gz
Optimizing hash keys into shared strings doesn't work with ithreads.
Subject: Re: [ID 20000907.008] Not OK: v5.7.0 on alpha-dec_osf-thread-multi Message-Id: <200009080530.BAA10498@leggy.zk3.dec.com> p4raw-id: //depot/perl@7037
Diffstat (limited to 'op.c')
-rw-r--r--op.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/op.c b/op.c
index 1203802d27..c31bf15b57 100644
--- a/op.c
+++ b/op.c
@@ -495,7 +495,8 @@ Perl_pad_alloc(pTHX_ I32 optype, U32 tmptype)
(sv = names[PL_padix]) && sv != &PL_sv_undef)
continue;
sv = *av_fetch(PL_comppad, PL_padix, TRUE);
- if (!(SvFLAGS(sv) & (SVs_PADTMP|SVs_PADMY)) && !IS_PADGV(sv))
+ if (!(SvFLAGS(sv) & (SVs_PADTMP|SVs_PADMY)) &&
+ !IS_PADGV(sv) && !IS_PADCONST(sv))
break;
}
retval = PL_padix;
@@ -6673,7 +6674,7 @@ Perl_peep(pTHX_ register OP *o)
/* Make the CONST have a shared SV */
svp = cSVOPx_svp(((BINOP*)o)->op_last);
- if (!SvFAKE(sv = *svp) || !SvREADONLY(sv)) {
+ if ((!SvFAKE(sv = *svp) || !SvREADONLY(sv)) && !IS_PADCONST(sv)) {
key = SvPV(sv, keylen);
lexname = newSVpvn_share(key, keylen, 0);
SvREFCNT_dec(sv);