Fixed signed/unsigned comparison warning

This commit is contained in:
Antoine Pitrou 2014-10-15 23:14:53 +02:00
parent ea1f665197
commit 4e334241b7
1 changed files with 1 additions and 1 deletions

View File

@ -9675,7 +9675,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;
} }