summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-07-08 08:55:03 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-07-08 08:55:03 +0000
commit36fa4a92fa2e187f9965ef5bcea070fe4a0025fd (patch)
treeb0f6ded3f2992d8c15083b379058f6bb9c73ec9f /gv.c
parentca9dfc883b7dc3204e375cea5d38c48cb1715f83 (diff)
downloadperl-36fa4a92fa2e187f9965ef5bcea070fe4a0025fd.tar.gz
change#1350 breaks things, back it out
p4raw-link: @1350 on //depot/perl: a4bb25971c379e48da873823e220bdef09e90ab9 p4raw-id: //depot/perl@1376
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/gv.c b/gv.c
index 816caabcef..07c0b19b6f 100644
--- a/gv.c
+++ b/gv.c
@@ -103,7 +103,6 @@ gv_init(GV *gv, HV *stash, char *name, STRLEN len, int multi)
GvSV(gv) = NEWSV(72,0);
GvLINE(gv) = curcop->cop_line;
GvFILEGV(gv) = curcop->cop_filegv;
- GvCVGEN(gv) = sub_generation - 1; /* as old as possible */
GvEGV(gv) = gv;
sv_magic((SV*)gv, (SV*)gv, '*', name, len);
GvSTASH(gv) = (HV*)SvREFCNT_inc(stash);
@@ -118,6 +117,7 @@ gv_init(GV *gv, HV *stash, char *name, STRLEN len, int multi)
GvCV(gv) = compcv;
LEAVE;
+ GvCVGEN(gv) = 0;
sub_generation++;
CvGV(GvCV(gv)) = (GV*)SvREFCNT_inc(gv);
CvFILEGV(GvCV(gv)) = curcop->cop_filegv;
@@ -176,15 +176,13 @@ gv_fetchmeth(HV *stash, char *name, STRLEN len, I32 level)
gv_init(topgv, stash, name, len, TRUE);
if (cv = GvCV(topgv)) {
/* If genuine method or valid cache entry, use it */
- if (!GvCVGEN(topgv) || GvCVGEN(topgv) == sub_generation)
+ if (!GvCVGEN(topgv) || GvCVGEN(topgv) >= sub_generation)
return topgv;
/* Stale cached entry: junk it */
SvREFCNT_dec(cv);
GvCV(topgv) = cv = Nullcv;
GvCVGEN(topgv) = 0;
}
- else if (GvCVGEN(topgv) == sub_generation)
- return 0; /* cache indicates sub doesn't exist */
}
gvp = (GV**)hv_fetch(stash, "ISA", 3, FALSE);
@@ -260,10 +258,6 @@ gv_fetchmeth(HV *stash, char *name, STRLEN len, I32 level)
}
return gv;
}
- else if (topgv && GvREFCNT(topgv) == 1) {
- /* cache the fact that the method is not defined */
- GvCVGEN(topgv) = sub_generation;
- }
}
}