summaryrefslogtreecommitdiff
path: root/av.c
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2013-02-07 12:06:43 -0700
committerKarl Williamson <public@khwilliamson.com>2013-02-08 14:44:24 -0700
commitbe3a7a5d0cbc1f6097d4470182c7b7e1d05d94c0 (patch)
tree4ec0851bd5646ca915334b097eae028164219ece /av.c
parentdab460cdc878907f9f3f36b96709f818ac937409 (diff)
downloadperl-be3a7a5d0cbc1f6097d4470182c7b7e1d05d94c0.tar.gz
Inline av_top_index()
This function is just an assert and a macro call. Avoid the function call overhead by making it inline.
Diffstat (limited to 'av.c')
-rw-r--r--av.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/av.c b/av.c
index 18fa3c3f5d..a24bda0872 100644
--- a/av.c
+++ b/av.c
@@ -778,24 +778,9 @@ meaning from what the similarly named L</sv_len> returns.
I32
Perl_av_len(pTHX_ AV *av)
{
- /* If change this, must change identical Perl_av_top_index() just below */
-
PERL_ARGS_ASSERT_AV_LEN;
- assert(SvTYPE(av) == SVt_PVAV);
-
- return AvFILL(av);
-}
-
-I32
-Perl_av_top_index(pTHX_ AV *av)
-{
- /* So short, that it is just a duplicate of Perl_av_len(). Must keep them
- * in sync */
-
- PERL_ARGS_ASSERT_AV_TOP_INDEX;
- assert(SvTYPE(av) == SVt_PVAV);
- return AvFILL(av);
+ return av_top_index(av);
}
/*