mirror of
https://github.com/python/cpython.git
synced 2025-07-27 21:24:32 +00:00
C++ compiler cleanup: bunch-o-casts, plus use of unsigned loop index var in a couple places
This commit is contained in:
parent
3fca463627
commit
429433b30b
6 changed files with 29 additions and 28 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue