diff options
author | Father Chrysostomos <sprout@cpan.org> | 2013-08-25 00:08:21 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2013-08-25 06:40:34 -0700 |
commit | c70927a6ffc3cac8e5ec375a3f7e13b4f7bd1ee4 (patch) | |
tree | 477e6abc58c0898bee5727b3feb27c9af685f49b /util.c | |
parent | 9a543cee73966ca61d6dc71cc7322f271f5b6b8b (diff) | |
download | perl-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 'util.c')
-rw-r--r-- | util.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -4299,7 +4299,7 @@ Perl_scan_version(pTHX_ const char *s, SV *rv, bool qv) } } if ( qv ) { /* quoted versions always get at least three terms*/ - I32 len = av_len(av); + SSize_t len = av_len(av); /* This for loop appears to trigger a compiler bug on OS X, as it loops infinitely. Yes, len is negative. No, it makes no sense. Compiler in question is: @@ -4364,7 +4364,7 @@ Perl_new_version(pTHX_ SV *ver) if ( sv_isobject(ver) && sv_derived_from(ver, "version") ) /* can just copy directly */ { - I32 key; + SSize_t key; AV * const av = newAV(); AV *sav; /* This will get reblessed later if a derived class*/ @@ -4608,7 +4608,8 @@ The SV returned has a refcount of 1. SV * Perl_vnumify(pTHX_ SV *vs) { - I32 i, len, digit; + SSize_t i, len; + I32 digit; int width; bool alpha = FALSE; SV *sv; @@ -4785,7 +4786,8 @@ converted into version objects. int Perl_vcmp(pTHX_ SV *lhv, SV *rhv) { - I32 i,l,m,r,retval; + I32 i,l,m,r; + I32 retval; bool lalpha = FALSE; bool ralpha = FALSE; I32 left = 0; |