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

@ -746,7 +746,7 @@ PyString_AsStringAndSize(register PyObject *obj,
*s = PyString_AS_STRING(obj);
if (len != NULL)
*len = PyString_GET_SIZE(obj);
else if (strlen(*s) != PyString_GET_SIZE(obj)) {
else if (strlen(*s) != (size_t)PyString_GET_SIZE(obj)) {
PyErr_SetString(PyExc_TypeError,
"expected string without null bytes");
return -1;