From f62ad4f2c4214fdc05cc45c27a5c068553c7942c Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 13 May 2022 12:41:05 +0200 Subject: gh-89653: Use int type for Unicode kind (#92704) Use the same type that PyUnicode_FromKindAndData() kind parameter type (public C API): int. --- Objects/bytesobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Objects/bytesobject.c') diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c index b429f7687f..1dfa1d57cf 100644 --- a/Objects/bytesobject.c +++ b/Objects/bytesobject.c @@ -2396,7 +2396,7 @@ _PyBytes_FromHex(PyObject *string, int use_bytearray) if (!PyUnicode_IS_ASCII(string)) { const void *data = PyUnicode_DATA(string); - unsigned int kind = PyUnicode_KIND(string); + int kind = PyUnicode_KIND(string); Py_ssize_t i; /* search for the first non-ASCII character */ -- cgit v1.2.1