summaryrefslogtreecommitdiff
path: root/universal.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2013-08-25 00:08:21 -0700
committerFather Chrysostomos <sprout@cpan.org>2013-08-25 06:40:34 -0700
commitc70927a6ffc3cac8e5ec375a3f7e13b4f7bd1ee4 (patch)
tree477e6abc58c0898bee5727b3feb27c9af685f49b /universal.c
parent9a543cee73966ca61d6dc71cc7322f271f5b6b8b (diff)
downloadperl-c70927a6ffc3cac8e5ec375a3f7e13b4f7bd1ee4.tar.gz
Use SSize_t for arrays
Make the array interface 64-bit safe by using SSize_t instead of I32 for array indices. This is based on a patch by Chip Salzenberg. This completes what the previous commit began when it changed av_extend.
Diffstat (limited to 'universal.c')
-rw-r--r--universal.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/universal.c b/universal.c
index 10fefe1e61..847de55b03 100644
--- a/universal.c
+++ b/universal.c
@@ -1042,9 +1042,9 @@ XS(XS_PerlIO_get_layers)
if (gv && (io = GvIO(gv))) {
AV* const av = PerlIO_get_layers(aTHX_ input ?
IoIFP(io) : IoOFP(io));
- I32 i;
- const I32 last = av_len(av);
- I32 nitem = 0;
+ SSize_t i;
+ const SSize_t last = av_len(av);
+ SSize_t nitem = 0;
for (i = last; i >= 0; i -= 3) {
SV * const * const namsvp = av_fetch(av, i - 2, FALSE);
@@ -1186,8 +1186,8 @@ XS(XS_re_regnames)
U32 flags;
SV *ret;
AV *av;
- I32 length;
- I32 i;
+ SSize_t length;
+ SSize_t i;
SV **entry;
if (items > 1)