diff --git a/Modules/timemodule.c b/Modules/timemodule.c index 32062a3a6a7f7b..15c467b9b4074e 100644 --- a/Modules/timemodule.c +++ b/Modules/timemodule.c @@ -440,7 +440,7 @@ gettmarg(PyObject *args, struct tm *p) if (Py_TYPE(args) == &StructTimeType) { PyObject *item; item = PyTuple_GET_ITEM(args, 9); - p->tm_zone = item == Py_None ? NULL : PyUnicode_AsUTF8(item); + p->tm_zone = item == Py_None ? NULL : (char*)PyUnicode_AsUTF8(item); item = PyTuple_GET_ITEM(args, 10); p->tm_gmtoff = item == Py_None ? 0 : PyLong_AsLong(item); if (PyErr_Occurred())