diff options
author | Victor Stinner <vstinner@python.org> | 2022-05-13 10:41:05 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-13 10:41:05 (GMT) |
commit | f62ad4f2c4214fdc05cc45c27a5c068553c7942c (patch) | |
tree | 5c8cf46c3ae7c874ac601f3e18357a1862474fba /Python | |
parent | 22a1db378c5c381272362c5b2f68ac78a368e136 (diff) | |
download | cpython-f62ad4f2c4214fdc05cc45c27a5c068553c7942c.zip cpython-f62ad4f2c4214fdc05cc45c27a5c068553c7942c.tar.gz cpython-f62ad4f2c4214fdc05cc45c27a5c068553c7942c.tar.bz2 |
gh-89653: Use int type for Unicode kind (#92704)
Use the same type that PyUnicode_FromKindAndData() kind parameter
type (public C API): int.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/formatter_unicode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/formatter_unicode.c b/Python/formatter_unicode.c index 04d37c0..38e5f69 100644 --- a/Python/formatter_unicode.c +++ b/Python/formatter_unicode.c @@ -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'; |