summaryrefslogtreecommitdiff
path: root/Objects/stringobject.c
diff options
context:
space:
mode:
authorSkip Montanaro <skip@pobox.com>2006-04-18 00:35:43 +0000
committerSkip Montanaro <skip@pobox.com>2006-04-18 00:35:43 +0000
commit429433b30bbfb957c38b1bc0b699cda2fb30db1c (patch)
treed97ccffce27c3b20279446d3097f1d0a829b7b37 /Objects/stringobject.c
parent3fca46362798d3a5bcf1494f405b79fb4bdfb62a (diff)
downloadcpython-git-429433b30bbfb957c38b1bc0b699cda2fb30db1c.tar.gz
C++ compiler cleanup: bunch-o-casts, plus use of unsigned loop index var in a couple places
Diffstat (limited to 'Objects/stringobject.c')
-rw-r--r--Objects/stringobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/stringobject.c b/Objects/stringobject.c
index 9d4dc7410d..ef3b825037 100644
--- a/Objects/stringobject.c
+++ b/Objects/stringobject.c
@@ -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;