From b6dc9b7554517f97c8474bb58a059a5d036745d2 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Wed, 15 Oct 2014 23:14:53 +0200 Subject: Fixed signed/unsigned comparison warning --- Objects/unicodeobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit v0.12