gh-89653: Use int type for Unicode kind (#92704)

Use the same type that PyUnicode_FromKindAndData() kind parameter
type (public C API): int.
This commit is contained in:
Victor Stinner 2022-05-13 12:41:05 +02:00 committed by GitHub
parent 22a1db378c
commit f62ad4f2c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 49 additions and 52 deletions

View file

@ -608,7 +608,7 @@ fill_number(_PyUnicodeWriter *writer, const NumberFieldWidths *spec,
{
/* Used to keep track of digits, decimal, and remainder. */
Py_ssize_t d_pos = d_start;
const unsigned int kind = writer->kind;
const int kind = writer->kind;
const void *data = writer->data;
Py_ssize_t r;
@ -1215,7 +1215,7 @@ format_complex_internal(PyObject *value,
int flags = 0;
int result = -1;
Py_UCS4 maxchar = 127;
enum PyUnicode_Kind rkind;
int rkind;
void *rdata;
Py_UCS4 re_sign_char = '\0';
Py_UCS4 im_sign_char = '\0';