summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-02-07 21:18:12 -0500
committerGurusamy Sarathy <gsar@cpan.org>1998-02-09 00:29:08 +0000
commit6fa846a0fd7cc2ae5e3b64d50725670719a8e426 (patch)
tree0383d6971cf2d158bf305758f3f3f351931c52bf /gv.c
parent3b405fc5a4874f8f9b9c090b5e21438c471308f6 (diff)
downloadperl-6fa846a0fd7cc2ae5e3b64d50725670719a8e426.tar.gz
[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
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/gv.c b/gv.c
index 3633e7bf62..11dc761e14 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();