summaryrefslogtreecommitdiff
path: root/Objects/bytesobject.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2022-05-13 12:41:05 +0200
committerGitHub <noreply@github.com>2022-05-13 12:41:05 +0200
commitf62ad4f2c4214fdc05cc45c27a5c068553c7942c (patch)
tree5c8cf46c3ae7c874ac601f3e18357a1862474fba /Objects/bytesobject.c
parent22a1db378c5c381272362c5b2f68ac78a368e136 (diff)
downloadcpython-git-f62ad4f2c4214fdc05cc45c27a5c068553c7942c.tar.gz
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 'Objects/bytesobject.c')
-rw-r--r--Objects/bytesobject.c2
1 files changed, 1 insertions, 1 deletions
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 */