@@ -10037,9 +10037,9 @@ handle_capital_sigma(int kind, const void *data, Py_ssize_t length, Py_ssize_t i
1003710037 return (final_sigma ) ? 0x3C2 : 0x3C3 ;
1003810038}
1003910039
10040- static int
10040+ static Py_ssize_t
1004110041lower_ucs4 (int kind , const void * data , Py_ssize_t length , Py_ssize_t i ,
10042- Py_UCS4 c , Py_UCS4 * mapped , int mapped_size )
10042+ Py_UCS4 c , Py_UCS4 * mapped , Py_ssize_t mapped_size )
1004310043{
1004410044 /* Obscure special case. */
1004510045 if (c == 0x3A3 ) {
@@ -10052,8 +10052,7 @@ lower_ucs4(int kind, const void *data, Py_ssize_t length, Py_ssize_t i,
1005210052static Py_ssize_t
1005310053do_capitalize (int kind , const void * data , Py_ssize_t length , Py_UCS4 * res , Py_UCS4 * maxchar )
1005410054{
10055- Py_ssize_t i , k = 0 ;
10056- int n_res , j ;
10055+ Py_ssize_t i , k = 0 , n_res , j ;
1005710056 Py_UCS4 c , mapped [3 ];
1005810057
1005910058 c = PyUnicode_READ (kind , data , 0 );
@@ -10081,7 +10080,7 @@ do_swapcase(int kind, const void *data, Py_ssize_t length, Py_UCS4 *res, Py_UCS4
1008110080
1008210081 for (i = 0 ; i < length ; i ++ ) {
1008310082 Py_UCS4 c = PyUnicode_READ (kind , data , i ), mapped [3 ];
10084- int n_res , j ;
10083+ Py_ssize_t n_res , j ;
1008510084 if (Py_UNICODE_ISUPPER (c )) {
1008610085 n_res = lower_ucs4 (kind , data , length , i , c , mapped , Py_ARRAY_LENGTH (mapped ));
1008710086 }
@@ -10109,7 +10108,7 @@ do_upper_or_lower(int kind, const void *data, Py_ssize_t length, Py_UCS4 *res,
1010910108
1011010109 for (i = 0 ; i < length ; i ++ ) {
1011110110 Py_UCS4 c = PyUnicode_READ (kind , data , i ), mapped [3 ];
10112- int n_res , j ;
10111+ Py_ssize_t n_res , j ;
1011310112 if (lower )
1011410113 n_res = lower_ucs4 (kind , data , length , i , c , mapped , Py_ARRAY_LENGTH (mapped ));
1011510114 else
@@ -10143,7 +10142,7 @@ do_casefold(int kind, const void *data, Py_ssize_t length, Py_UCS4 *res, Py_UCS4
1014310142 for (i = 0 ; i < length ; i ++ ) {
1014410143 Py_UCS4 c = PyUnicode_READ (kind , data , i );
1014510144 Py_UCS4 mapped [3 ];
10146- int j , n_res = PyUnicode_ToFolded (c , mapped , Py_ARRAY_LENGTH (mapped ));
10145+ Py_ssize_t j , n_res = PyUnicode_ToFolded (c , mapped , Py_ARRAY_LENGTH (mapped ));
1014710146 assert (n_res >= 1 );
1014810147 for (j = 0 ; j < n_res ; j ++ ) {
1014910148 * maxchar = Py_MAX (* maxchar , mapped [j ]);
@@ -10163,7 +10162,7 @@ do_title(int kind, const void *data, Py_ssize_t length, Py_UCS4 *res, Py_UCS4 *m
1016310162 for (i = 0 ; i < length ; i ++ ) {
1016410163 const Py_UCS4 c = PyUnicode_READ (kind , data , i );
1016510164 Py_UCS4 mapped [3 ];
10166- int n_res , j ;
10165+ Py_ssize_t n_res , j ;
1016710166
1016810167 if (previous_is_cased )
1016910168 n_res = lower_ucs4 (kind , data , length , i , c , mapped , Py_ARRAY_LENGTH (mapped ));
0 commit comments