summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2014-10-15 21:14:53 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2014-10-15 21:14:53 (GMT)
commit4e334241b7675ca07f5965d9f95d4d213f886ccf (patch)
treebc8dd5d55e1498d86d835f47ce6a7eac7cb3cd88
parentea1f665197bb5bd8e169106d78801b9ad0f923d2 (diff)
downloadcpython-4e334241b7675ca07f5965d9f95d4d213f886ccf.zip
cpython-4e334241b7675ca07f5965d9f95d4d213f886ccf.tar.gz
cpython-4e334241b7675ca07f5965d9f95d4d213f886ccf.tar.bz2
Fixed signed/unsigned comparison warning
-rw-r--r--Objects/unicodeobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index cc36e7a..898b20d 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -9675,7 +9675,7 @@ case_operation(PyObject *self,
kind = PyUnicode_KIND(self);
data = PyUnicode_DATA(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");
return NULL;
}