@@ -9994,9 +9994,9 @@ handle_capital_sigma(int kind, const void *data, Py_ssize_t length, Py_ssize_t i
9994
9994
return (final_sigma ) ? 0x3C2 : 0x3C3 ;
9995
9995
}
9996
9996
9997
- static int
9997
+ static Py_ssize_t
9998
9998
lower_ucs4 (int kind , const void * data , Py_ssize_t length , Py_ssize_t i ,
9999
- Py_UCS4 c , Py_UCS4 * mapped , int mapped_size )
9999
+ Py_UCS4 c , Py_UCS4 * mapped , Py_ssize_t mapped_size )
10000
10000
{
10001
10001
/* Obscure special case. */
10002
10002
if (c == 0x3A3 ) {
@@ -10009,8 +10009,7 @@ lower_ucs4(int kind, const void *data, Py_ssize_t length, Py_ssize_t i,
10009
10009
static Py_ssize_t
10010
10010
do_capitalize (int kind , const void * data , Py_ssize_t length , Py_UCS4 * res , Py_UCS4 * maxchar )
10011
10011
{
10012
- Py_ssize_t i , k = 0 ;
10013
- int n_res , j ;
10012
+ Py_ssize_t i , k = 0 , n_res , j ;
10014
10013
Py_UCS4 c , mapped [3 ];
10015
10014
10016
10015
c = PyUnicode_READ (kind , data , 0 );
@@ -10038,7 +10037,7 @@ do_swapcase(int kind, const void *data, Py_ssize_t length, Py_UCS4 *res, Py_UCS4
10038
10037
10039
10038
for (i = 0 ; i < length ; i ++ ) {
10040
10039
Py_UCS4 c = PyUnicode_READ (kind , data , i ), mapped [3 ];
10041
- int n_res , j ;
10040
+ Py_ssize_t n_res , j ;
10042
10041
if (Py_UNICODE_ISUPPER (c )) {
10043
10042
n_res = lower_ucs4 (kind , data , length , i , c , mapped , Py_ARRAY_LENGTH (mapped ));
10044
10043
}
@@ -10066,7 +10065,7 @@ do_upper_or_lower(int kind, const void *data, Py_ssize_t length, Py_UCS4 *res,
10066
10065
10067
10066
for (i = 0 ; i < length ; i ++ ) {
10068
10067
Py_UCS4 c = PyUnicode_READ (kind , data , i ), mapped [3 ];
10069
- int n_res , j ;
10068
+ Py_ssize_t n_res , j ;
10070
10069
if (lower )
10071
10070
n_res = lower_ucs4 (kind , data , length , i , c , mapped , Py_ARRAY_LENGTH (mapped ));
10072
10071
else
@@ -10100,7 +10099,7 @@ do_casefold(int kind, const void *data, Py_ssize_t length, Py_UCS4 *res, Py_UCS4
10100
10099
for (i = 0 ; i < length ; i ++ ) {
10101
10100
Py_UCS4 c = PyUnicode_READ (kind , data , i );
10102
10101
Py_UCS4 mapped [3 ];
10103
- int j , n_res = PyUnicode_ToFolded (c , mapped , Py_ARRAY_LENGTH (mapped ));
10102
+ Py_ssize_t j , n_res = PyUnicode_ToFolded (c , mapped , Py_ARRAY_LENGTH (mapped ));
10104
10103
assert (n_res >= 1 );
10105
10104
for (j = 0 ; j < n_res ; j ++ ) {
10106
10105
* maxchar = Py_MAX (* maxchar , mapped [j ]);
@@ -10120,7 +10119,7 @@ do_title(int kind, const void *data, Py_ssize_t length, Py_UCS4 *res, Py_UCS4 *m
10120
10119
for (i = 0 ; i < length ; i ++ ) {
10121
10120
const Py_UCS4 c = PyUnicode_READ (kind , data , i );
10122
10121
Py_UCS4 mapped [3 ];
10123
- int n_res , j ;
10122
+ Py_ssize_t n_res , j ;
10124
10123
10125
10124
if (previous_is_cased )
10126
10125
n_res = lower_ucs4 (kind , data , length , i , c , mapped , Py_ARRAY_LENGTH (mapped ));
0 commit comments