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)
commitb6dc9b7554517f97c8474bb58a059a5d036745d2 (patch)
treecbedf530f40c8fa32f4d4cce8ac7df584b13ac98
parent4d856895bdbaecb2b9619178f9966dd48f48aded (diff)
downloadcpython-b6dc9b7554517f97c8474bb58a059a5d036745d2.zip
cpython-b6dc9b7554517f97c8474bb58a059a5d036745d2.tar.gz
cpython-b6dc9b7554517f97c8474bb58a059a5d036745d2.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 8eb2dd2..e896aba 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -9484,7 +9484,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;
}