summaryrefslogtreecommitdiff
path: root/mro.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-04-21 09:06:38 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-04-21 09:06:38 +0000
commit640da897d5acac197d270d816dc0d8bad1c1cedb (patch)
treef5b6791a489eeb972fc2299b02c18ed259b66778 /mro.c
parent1c908217bae1c3a800ab597874385863233a95d5 (diff)
downloadperl-640da897d5acac197d270d816dc0d8bad1c1cedb.tar.gz
Small optimisations, by Brandon Black
p4raw-id: //depot/perl@31003
Diffstat (limited to 'mro.c')
-rw-r--r--mro.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mro.c b/mro.c
index 7cbaca8977..d860c33551 100644
--- a/mro.c
+++ b/mro.c
@@ -138,7 +138,7 @@ Perl_mro_get_linear_isa_dfs(pTHX_ HV *stash, I32 level)
gvp = (GV**)hv_fetchs(stash, "ISA", FALSE);
av = (gvp && (gv = *gvp) && isGV_with_GP(gv)) ? GvAV(gv) : NULL;
- if(av) {
+ if(av && AvFILLp(av) >= 0) {
/* "stored" is used to keep track of all of the classnames
we have added to the MRO so far, so we can do a quick
@@ -673,7 +673,7 @@ __nextcan(pTHX_ SV* self, I32 throw_nomethod)
}
/* Use the cached coderef if it exists */
- if((cache_entry = hv_fetch_ent(nmcache, sv, 0, 0))) {
+ else if((cache_entry = hv_fetch_ent(nmcache, sv, 0, 0))) {
SV* val = HeVAL(cache_entry);
if(val == &PL_sv_undef) {
if(throw_nomethod)