diff options
author | Karl Williamson <public@khwilliamson.com> | 2013-02-07 12:06:43 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2013-02-08 14:44:24 -0700 |
commit | be3a7a5d0cbc1f6097d4470182c7b7e1d05d94c0 (patch) | |
tree | 4ec0851bd5646ca915334b097eae028164219ece /inline.h | |
parent | dab460cdc878907f9f3f36b96709f818ac937409 (diff) | |
download | perl-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 'inline.h')
-rw-r--r-- | inline.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -12,6 +12,17 @@ * Each section names the header file that the functions "belong" to. */ +/* ------------------------------- av.h ------------------------------- */ + +PERL_STATIC_INLINE I32 +S_av_top_index(pTHX_ AV *av) +{ + PERL_ARGS_ASSERT_AV_TOP_INDEX; + assert(SvTYPE(av) == SVt_PVAV); + + return AvFILL(av); +} + /* ------------------------------- cv.h ------------------------------- */ PERL_STATIC_INLINE I32 * |