C++ compiler cleanup: bunch-o-casts, plus use of unsigned loop index var in a couple places

This commit is contained in:
Skip Montanaro 2006-04-18 00:35:43 +00:00
parent 3fca463627
commit 429433b30b
6 changed files with 29 additions and 28 deletions

View file

@ -97,7 +97,7 @@ PyFloat_FromString(PyObject *v, char **pend)
}
#ifdef Py_USING_UNICODE
else if (PyUnicode_Check(v)) {
if (PyUnicode_GET_SIZE(v) >= sizeof(s_buffer)) {
if (PyUnicode_GET_SIZE(v) >= (Py_ssize_t)sizeof(s_buffer)) {
PyErr_SetString(PyExc_ValueError,
"Unicode float() literal too long to convert");
return NULL;