summaryrefslogtreecommitdiffstats
path: root/Modules/_elementtree.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2022-05-13 10:41:05 (GMT)
committerGitHub <noreply@github.com>2022-05-13 10:41:05 (GMT)
commitf62ad4f2c4214fdc05cc45c27a5c068553c7942c (patch)
tree5c8cf46c3ae7c874ac601f3e18357a1862474fba /Modules/_elementtree.c
parent22a1db378c5c381272362c5b2f68ac78a368e136 (diff)
downloadcpython-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 'Modules/_elementtree.c')
-rw-r--r--Modules/_elementtree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c
index 89f877f..453e57a 100644
--- a/Modules/_elementtree.c
+++ b/Modules/_elementtree.c
@@ -1121,7 +1121,7 @@ checkpath(PyObject* tag)
if (PyUnicode_Check(tag)) {
const Py_ssize_t len = PyUnicode_GET_LENGTH(tag);
const void *data = PyUnicode_DATA(tag);
- unsigned int kind = PyUnicode_KIND(tag);
+ int kind = PyUnicode_KIND(tag);
if (len >= 3 && PyUnicode_READ(kind, data, 0) == '{' && (
PyUnicode_READ(kind, data, 1) == '}' || (
PyUnicode_READ(kind, data, 1) == '*' &&