@@ -9994,9 +9994,9 @@ handle_capital_sigma(int kind, const void *data, Py_ssize_t length, Py_ssize_t i
99949994 return (final_sigma ) ? 0x3C2 : 0x3C3 ;
99959995}
99969996
9997- static int
9997+ static Py_ssize_t
99989998lower_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 )
1000010000{
1000110001 /* Obscure special case. */
1000210002 if (c == 0x3A3 ) {
@@ -10009,8 +10009,7 @@ lower_ucs4(int kind, const void *data, Py_ssize_t length, Py_ssize_t i,
1000910009static Py_ssize_t
1001010010do_capitalize (int kind , const void * data , Py_ssize_t length , Py_UCS4 * res , Py_UCS4 * maxchar )
1001110011{
10012- Py_ssize_t i , k = 0 ;
10013- int n_res , j ;
10012+ Py_ssize_t i , k = 0 , n_res , j ;
1001410013 Py_UCS4 c , mapped [3 ];
1001510014
1001610015 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
1003810037
1003910038 for (i = 0 ; i < length ; i ++ ) {
1004010039 Py_UCS4 c = PyUnicode_READ (kind , data , i ), mapped [3 ];
10041- int n_res , j ;
10040+ Py_ssize_t n_res , j ;
1004210041 if (Py_UNICODE_ISUPPER (c )) {
1004310042 n_res = lower_ucs4 (kind , data , length , i , c , mapped , Py_ARRAY_LENGTH (mapped ));
1004410043 }
@@ -10066,7 +10065,7 @@ do_upper_or_lower(int kind, const void *data, Py_ssize_t length, Py_UCS4 *res,
1006610065
1006710066 for (i = 0 ; i < length ; i ++ ) {
1006810067 Py_UCS4 c = PyUnicode_READ (kind , data , i ), mapped [3 ];
10069- int n_res , j ;
10068+ Py_ssize_t n_res , j ;
1007010069 if (lower )
1007110070 n_res = lower_ucs4 (kind , data , length , i , c , mapped , Py_ARRAY_LENGTH (mapped ));
1007210071 else
@@ -10100,7 +10099,7 @@ do_casefold(int kind, const void *data, Py_ssize_t length, Py_UCS4 *res, Py_UCS4
1010010099 for (i = 0 ; i < length ; i ++ ) {
1010110100 Py_UCS4 c = PyUnicode_READ (kind , data , i );
1010210101 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 ));
1010410103 assert (n_res >= 1 );
1010510104 for (j = 0 ; j < n_res ; j ++ ) {
1010610105 * 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
1012010119 for (i = 0 ; i < length ; i ++ ) {
1012110120 const Py_UCS4 c = PyUnicode_READ (kind , data , i );
1012210121 Py_UCS4 mapped [3 ];
10123- int n_res , j ;
10122+ Py_ssize_t n_res , j ;
1012410123
1012510124 if (previous_is_cased )
1012610125 n_res = lower_ucs4 (kind , data , length , i , c , mapped , Py_ARRAY_LENGTH (mapped ));
0 commit comments