summaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2019-04-01 14:02:08 -0600
committerKarl Williamson <khw@cpan.org>2019-04-20 00:37:35 -0600
commit1eff2a3bdc2156a635d357cfddb9b9ffe4dc0366 (patch)
treea7c7e75d75d5b5cbe46182cc87995b74745b6da1 /dist
parent72ec356aad7b03000d4bdd5c3ff741c3e43f7c31 (diff)
downloadperl-1eff2a3bdc2156a635d357cfddb9b9ffe4dc0366.tar.gz
Devel-PPPort: Implement av_top_index, av_tindex
Diffstat (limited to 'dist')
-rw-r--r--dist/Devel-PPPort/Changes1
-rw-r--r--dist/Devel-PPPort/parts/inc/misc24
-rw-r--r--dist/Devel-PPPort/t/misc.t7
3 files changed, 29 insertions, 3 deletions
diff --git a/dist/Devel-PPPort/Changes b/dist/Devel-PPPort/Changes
index e541e87288..66322aee11 100644
--- a/dist/Devel-PPPort/Changes
+++ b/dist/Devel-PPPort/Changes
@@ -18,6 +18,7 @@
* Added isFOO_A synonyms for all character classification isFOO
macros
* Provide LIKELY/UNLIKELY branch prediction
+ * Provide av_tindex/av_top_index
3.45 - 2019-03-19
diff --git a/dist/Devel-PPPort/parts/inc/misc b/dist/Devel-PPPort/parts/inc/misc
index 27cc0aaac3..ac01de3792 100644
--- a/dist/Devel-PPPort/parts/inc/misc
+++ b/dist/Devel-PPPort/parts/inc/misc
@@ -199,6 +199,9 @@ __UNDEFINED__ DEFSV_set(sv) (DEFSV = (sv))
/* Older perls (<=5.003) lack AvFILLp */
__UNDEFINED__ AvFILLp AvFILL
+__UNDEFINED__ av_tindex AvFILL
+__UNDEFINED__ av_top_index AvFILL
+
__UNDEFINED__ ERRSV get_sv("@",FALSE)
/* Hint: gv_stashpvn
@@ -1109,7 +1112,23 @@ test_isPSXSPC_A(UV ord)
OUTPUT:
RETVAL
-=tests plan => 126
+STRLEN
+av_tindex(av)
+ AV *av
+ CODE:
+ RETVAL = av_tindex(av);
+ OUTPUT:
+ RETVAL
+
+STRLEN
+av_top_index(av)
+ AV *av
+ CODE:
+ RETVAL = av_top_index(av);
+ OUTPUT:
+ RETVAL
+
+=tests plan => 128
use vars qw($my_sv @my_av %my_hv);
@@ -1343,3 +1362,6 @@ ok(! Devel::PPPort::test_isPSXSPC(ord("k")));
ok( Devel::PPPort::test_isPSXSPC_A(ord("\cK")));
ok(! Devel::PPPort::test_isPSXSPC_A(0xFC));
+
+ok(&Devel::PPPort::av_top_index([1,2,3]), 2);
+ok(&Devel::PPPort::av_tindex([1,2,3,4]), 3);
diff --git a/dist/Devel-PPPort/t/misc.t b/dist/Devel-PPPort/t/misc.t
index 9fc25821cf..7fbd3e9c8f 100644
--- a/dist/Devel-PPPort/t/misc.t
+++ b/dist/Devel-PPPort/t/misc.t
@@ -30,9 +30,9 @@ BEGIN {
require 'testutil.pl' if $@;
}
- if (126) {
+ if (128) {
load();
- plan(tests => 126);
+ plan(tests => 128);
}
}
@@ -281,3 +281,6 @@ ok(! Devel::PPPort::test_isPSXSPC(ord("k")));
ok( Devel::PPPort::test_isPSXSPC_A(ord("\cK")));
ok(! Devel::PPPort::test_isPSXSPC_A(0xFC));
+ok(&Devel::PPPort::av_top_index([1,2,3]), 2);
+ok(&Devel::PPPort::av_tindex([1,2,3,4]), 3);
+