From: Gurusamy Sarathy Date: Sun, 8 Feb 1998 02:18:12 +0000 (-0500) Subject: [win32] fix misapplied hunks in 5.004_58 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6fa846a0fd7cc2ae5e3b64d50725670719a8e426;p=p5sagit%2Fp5-mst-13.2.git [win32] fix misapplied hunks in 5.004_58 Message-Id: <199802080718.CAA18115@aatma.engin.umich.edu> Subject: [PATCH] fixes for test failures in 5.004_58 p4raw-id: //depot/win32/perl@488 --- diff --git a/gv.c b/gv.c index 3633e7b..11dc761 100644 --- a/gv.c +++ b/gv.c @@ -426,18 +426,17 @@ gv_fetchpv(char *nambeg, I32 add, I32 sv_type) tmpbuf[len++] = ':'; tmpbuf[len] = '\0'; gvp = (GV**)hv_fetch(stash,tmpbuf,len,add); + gv = gvp ? *gvp : Nullgv; + if (gv && gv != (GV*)&sv_undef) { + if (SvTYPE(gv) != SVt_PVGV) + gv_init(gv, stash, tmpbuf, len, (add & 2)); + else + GvMULTI_on(gv); + } if (tmpbuf != autobuf) Safefree(tmpbuf); - if (!gvp || *gvp == (GV*)&sv_undef) + if (!gv || gv == (GV*)&sv_undef) return Nullgv; - gv = *gvp; - - if (SvTYPE(gv) == SVt_PVGV) - GvMULTI_on(gv); - else if (!add) - return Nullgv; - else - gv_init(gv, stash, nambeg, namend - nambeg, (add & 2)); if (!(stash = GvHV(gv))) stash = GvHV(gv) = newHV(); diff --git a/op.c b/op.c index 5e2f5c2..c5c475a 100644 --- a/op.c +++ b/op.c @@ -4612,7 +4612,7 @@ ck_subr(OP *o) kid->op_sibling = 0; o2 = newUNOP(OP_RV2GV, 0, kid); o2->op_sibling = sib; - prev->op_sibling = o; + prev->op_sibling = o2; } goto wrapref; case '\\': @@ -4641,9 +4641,10 @@ ck_subr(OP *o) wrapref: { OP* kid = o2; - o2 = newUNOP(OP_REFGEN, 0, kid); - o2->op_sibling = kid->op_sibling; + OP* sib = kid->op_sibling; kid->op_sibling = 0; + o2 = newUNOP(OP_REFGEN, 0, kid); + o2->op_sibling = sib; prev->op_sibling = o2; } break;