mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
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:
parent
22a1db378c
commit
f62ad4f2c4
13 changed files with 49 additions and 52 deletions
|
@ -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) == '*' &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue