antoine.pitrou
2014-10-15 21:15:22 UTC
https://hg.python.org/cpython/rev/030fda7b1de8
changeset: 93085:030fda7b1de8
user: Antoine Pitrou <solipsis at pitrou.net>
date: Wed Oct 15 23:14:53 2014 +0200
summary:
Fixed signed/unsigned comparison warning
files:
Objects/unicodeobject.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -9675,7 +9675,7 @@
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;
}
changeset: 93085:030fda7b1de8
user: Antoine Pitrou <solipsis at pitrou.net>
date: Wed Oct 15 23:14:53 2014 +0200
summary:
Fixed signed/unsigned comparison warning
files:
Objects/unicodeobject.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -9675,7 +9675,7 @@
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;
}
--
Repository URL: https://hg.python.org/cpython
Repository URL: https://hg.python.org/cpython