diff options
author | Karl Williamson <khw@cpan.org> | 2020-08-19 19:06:01 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2020-08-19 19:11:45 -0600 |
commit | 8272d5bdfa99b9fd92be2d34da4d04eec4c6ddab (patch) | |
tree | a4ec9589fd9da1702b3c237aadd03a0b84cfede9 /pp.c | |
parent | a35255b755271d430494f12ae140641aeb8a1777 (diff) | |
download | perl-8272d5bdfa99b9fd92be2d34da4d04eec4c6ddab.tar.gz |
Use av_top_index() instead of av_tindex()
I was never happy with this short form, and other people weren't either.
Now that most things are better expressed in terms of av_count, convert
the few remaining items that are clearer when referring to an index into
using the fully spelled out form
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -4988,7 +4988,7 @@ PP(pp_aeach) IV *iterp = Perl_av_iter_p(aTHX_ array); const IV current = (*iterp)++; - if (current > av_tindex(array)) { + if (current > av_top_index(array)) { *iterp = 0; if (gimme == G_SCALAR) RETPUSHUNDEF; @@ -5859,7 +5859,7 @@ PP(pp_reverse) const MAGIC *mg; bool can_preserve = SvCANEXISTDELETE(av); - for (i = 0, j = av_tindex(av); i < j; ++i, --j) { + for (i = 0, j = av_top_index(av); i < j; ++i, --j) { SV *begin, *end; if (can_preserve) { |