@@ -466,7 +466,7 @@ parse_number(PyObject *s, Py_ssize_t pos, Py_ssize_t end,
466466 Return -1 on error. */
467467static Py_ssize_t
468468calc_number_widths (NumberFieldWidths * spec , Py_ssize_t n_prefix ,
469- Py_UCS4 sign_char , PyObject * number , Py_ssize_t n_start ,
469+ Py_UCS4 sign_char , Py_ssize_t n_start ,
470470 Py_ssize_t n_end , Py_ssize_t n_remainder ,
471471 int has_decimal , const LocaleInfo * locale ,
472472 const InternalFormatSpec * format , Py_UCS4 * maxchar )
@@ -595,7 +595,7 @@ calc_number_widths(NumberFieldWidths *spec, Py_ssize_t n_prefix,
595595 Return -1 on error, or 0 on success. */
596596static int
597597fill_number (_PyUnicodeWriter * writer , const NumberFieldWidths * spec ,
598- PyObject * digits , Py_ssize_t d_start , Py_ssize_t d_end ,
598+ PyObject * digits , Py_ssize_t d_start ,
599599 PyObject * prefix , Py_ssize_t p_start ,
600600 Py_UCS4 fill_char ,
601601 LocaleInfo * locale , int toupper )
@@ -983,7 +983,7 @@ format_long_internal(PyObject *value, const InternalFormatSpec *format,
983983 goto done ;
984984
985985 /* Calculate how much memory we'll need. */
986- n_total = calc_number_widths (& spec , n_prefix , sign_char , tmp , inumeric_chars ,
986+ n_total = calc_number_widths (& spec , n_prefix , sign_char , inumeric_chars ,
987987 inumeric_chars + n_digits , n_remainder , 0 ,
988988 & locale , format , & maxchar );
989989 if (n_total == -1 ) {
@@ -996,7 +996,7 @@ format_long_internal(PyObject *value, const InternalFormatSpec *format,
996996
997997 /* Populate the memory. */
998998 result = fill_number (writer , & spec ,
999- tmp , inumeric_chars , inumeric_chars + n_digits ,
999+ tmp , inumeric_chars ,
10001000 tmp , prefix , format -> fill_char ,
10011001 & locale , format -> type == 'X' );
10021002
@@ -1131,7 +1131,7 @@ format_float_internal(PyObject *value,
11311131 goto done ;
11321132
11331133 /* Calculate how much memory we'll need. */
1134- n_total = calc_number_widths (& spec , 0 , sign_char , unicode_tmp , index ,
1134+ n_total = calc_number_widths (& spec , 0 , sign_char , index ,
11351135 index + n_digits , n_remainder , has_decimal ,
11361136 & locale , format , & maxchar );
11371137 if (n_total == -1 ) {
@@ -1144,7 +1144,7 @@ format_float_internal(PyObject *value,
11441144
11451145 /* Populate the memory. */
11461146 result = fill_number (writer , & spec ,
1147- unicode_tmp , index , index + n_digits ,
1147+ unicode_tmp , index ,
11481148 NULL , 0 , format -> fill_char ,
11491149 & locale , 0 );
11501150
@@ -1316,7 +1316,7 @@ format_complex_internal(PyObject *value,
13161316 tmp_format .width = -1 ;
13171317
13181318 /* Calculate how much memory we'll need. */
1319- n_re_total = calc_number_widths (& re_spec , 0 , re_sign_char , re_unicode_tmp ,
1319+ n_re_total = calc_number_widths (& re_spec , 0 , re_sign_char ,
13201320 i_re , i_re + n_re_digits , n_re_remainder ,
13211321 re_has_decimal , & locale , & tmp_format ,
13221322 & maxchar );
@@ -1329,7 +1329,7 @@ format_complex_internal(PyObject *value,
13291329 * requested by the original format. */
13301330 if (!skip_re )
13311331 tmp_format .sign = '+' ;
1332- n_im_total = calc_number_widths (& im_spec , 0 , im_sign_char , im_unicode_tmp ,
1332+ n_im_total = calc_number_widths (& im_spec , 0 , im_sign_char ,
13331333 i_im , i_im + n_im_digits , n_im_remainder ,
13341334 im_has_decimal , & locale , & tmp_format ,
13351335 & maxchar );
@@ -1366,15 +1366,15 @@ format_complex_internal(PyObject *value,
13661366
13671367 if (!skip_re ) {
13681368 result = fill_number (writer , & re_spec ,
1369- re_unicode_tmp , i_re , i_re + n_re_digits ,
1369+ re_unicode_tmp , i_re ,
13701370 NULL , 0 ,
13711371 0 ,
13721372 & locale , 0 );
13731373 if (result == -1 )
13741374 goto done ;
13751375 }
13761376 result = fill_number (writer , & im_spec ,
1377- im_unicode_tmp , i_im , i_im + n_im_digits ,
1377+ im_unicode_tmp , i_im ,
13781378 NULL , 0 ,
13791379 0 ,
13801380 & locale , 0 );
0 commit comments