mirror of
https://github.com/python/cpython.git
synced 2025-08-29 13:15:11 +00:00
Fixed signed/unsigned comparison warning
This commit is contained in:
parent
4d856895bd
commit
b6dc9b7554
1 changed files with 1 additions and 1 deletions
|
@ -9484,7 +9484,7 @@ case_operation(PyObject *self,
|
||||||
kind = PyUnicode_KIND(self);
|
kind = PyUnicode_KIND(self);
|
||||||
data = PyUnicode_DATA(self);
|
data = PyUnicode_DATA(self);
|
||||||
length = PyUnicode_GET_LENGTH(self);
|
length = PyUnicode_GET_LENGTH(self);
|
||||||
if (length > PY_SSIZE_T_MAX / (3 * sizeof(Py_UCS4))) {
|
if ((size_t) length > PY_SSIZE_T_MAX / (3 * sizeof(Py_UCS4))) {
|
||||||
PyErr_SetString(PyExc_OverflowError, "string is too long");
|
PyErr_SetString(PyExc_OverflowError, "string is too long");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue