diff --git a/Modules/errnomodule.c b/Modules/errnomodule.c index 696d396b07a..21dfe1d3b5d 100644 --- a/Modules/errnomodule.c +++ b/Modules/errnomodule.c @@ -19,9 +19,9 @@ static PyMethodDef errno_methods[] = { /* Helper function doing the dictionary inserting */ static void -_inscode(PyObject *d, PyObject *de, char *name, int code) +_inscode(PyObject *d, PyObject *de, const char *name, int code) { - PyObject *u = PyString_FromString(name); + PyObject *u = PyUnicode_FromString(name); PyObject *v = PyInt_FromLong((long) code); /* Don't bother checking for errors; they'll be caught at the end