summaryrefslogtreecommitdiff
path: root/av.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-01-13 08:12:56 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-01-13 08:12:56 +0000
commit8ea97a1e700347a7b6ed9267c8c34f286f94d5d6 (patch)
treed874158b2a2f129bc9894352e73f9a15c5d0542c /av.c
parent010205895f86f073b0b2a20bd4cfbb05f0134888 (diff)
downloadperl-8ea97a1e700347a7b6ed9267c8c34f286f94d5d6.tar.gz
clearer docs for change#4796; faster av_exists()
p4raw-link: @4796 on //depot/perl: 010205895f86f073b0b2a20bd4cfbb05f0134888 p4raw-id: //depot/perl@4797
Diffstat (limited to 'av.c')
-rw-r--r--av.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/av.c b/av.c
index 3b7e81338a..af8296a841 100644
--- a/av.c
+++ b/av.c
@@ -663,8 +663,11 @@ Perl_av_exists(pTHX_ AV *av, I32 key)
return SvTRUE(sv);
}
}
- if (av_fetch(av, key, 0))
+ if (key <= AvFILLp(av) && AvARRAY(av)[key] != &PL_sv_undef
+ && AvARRAY(av)[key])
+ {
return TRUE;
+ }
else
return FALSE;
}