summaryrefslogtreecommitdiff
path: root/Modules/_tkinter.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_tkinter.c')
-rw-r--r--Modules/_tkinter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
index b5f23bc9d1..07175944ec 100644
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -1414,7 +1414,7 @@ varname_converter(PyObject *in, void *_out)
return 0;
}
s = PyBytes_AsString(in);
- if (strlen(s) != PyBytes_Size(in)) {
+ if (strlen(s) != (size_t)PyBytes_Size(in)) {
PyErr_SetString(PyExc_ValueError, "null byte in bytes object");
return 0;
}
@@ -1431,7 +1431,7 @@ varname_converter(PyObject *in, void *_out)
PyErr_SetString(PyExc_OverflowError, "string is too long");
return 0;
}
- if (strlen(s) != size) {
+ if (strlen(s) != (size_t)size) {
PyErr_SetString(PyExc_ValueError, "null character in string");
return 0;
}