mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
Fixes loop variables to be the same types as their limit (GH-120958)
This commit is contained in:
parent
2e157851e3
commit
e731554337
14 changed files with 26 additions and 26 deletions
|
@ -8373,7 +8373,7 @@ PyUnicode_BuildEncodingMap(PyObject* string)
|
|||
int count2 = 0, count3 = 0;
|
||||
int kind;
|
||||
const void *data;
|
||||
Py_ssize_t length;
|
||||
int length;
|
||||
Py_UCS4 ch;
|
||||
|
||||
if (!PyUnicode_Check(string) || !PyUnicode_GET_LENGTH(string)) {
|
||||
|
@ -8382,8 +8382,7 @@ PyUnicode_BuildEncodingMap(PyObject* string)
|
|||
}
|
||||
kind = PyUnicode_KIND(string);
|
||||
data = PyUnicode_DATA(string);
|
||||
length = PyUnicode_GET_LENGTH(string);
|
||||
length = Py_MIN(length, 256);
|
||||
length = (int)Py_MIN(PyUnicode_GET_LENGTH(string), 256);
|
||||
memset(level1, 0xFF, sizeof level1);
|
||||
memset(level2, 0xFF, sizeof level2);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue