summaryrefslogtreecommitdiff
path: root/Objects/stringobject.c
diff options
context:
space:
mode:
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;