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

@ -507,7 +507,7 @@ PyAPI_FUNC(Py_UCS4) _PyUnicode_FindMaxChar (
typedef struct {
PyObject *buffer;
void *data;
enum PyUnicode_Kind kind;
int kind;
Py_UCS4 maxchar;
Py_ssize_t size;
Py_ssize_t pos;
@ -566,7 +566,7 @@ _PyUnicodeWriter_PrepareInternal(_PyUnicodeWriter *writer,
macro instead. */
PyAPI_FUNC(int)
_PyUnicodeWriter_PrepareKindInternal(_PyUnicodeWriter *writer,
enum PyUnicode_Kind kind);
int kind);
/* Append a Unicode character.
Return 0 on success, raise an exception and return -1 on error. */