Mercurial > cpython-lru_cache-weakref
diff Objects/stringobject.c @ 37815:20cb13bdf1f0 legacy-trunk
C++ compiler cleanup: bunch-o-casts, plus use of unsigned loop index var in a couple places
| author | Skip Montanaro <skip@pobox.com> |
|---|---|
| date | Tue, 18 Apr 2006 00:35:43 +0000 |
| parents | ec00b798ab56 |
| children | dc8efd70ab56 |
line wrap: on
line diff
--- a/Objects/stringobject.c Tue Apr 18 00:29:29 2006 +0000 +++ b/Objects/stringobject.c Tue Apr 18 00:35:43 2006 +0000 @@ -746,7 +746,7 @@ *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;
