Skip to content

Commit 0d94203

Browse files
committed
Use unicode for the errno.errorcode names
1 parent 9af3ae4 commit 0d94203

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Modules/errnomodule.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ static PyMethodDef errno_methods[] = {
1919
/* Helper function doing the dictionary inserting */
2020

2121
static void
22-
_inscode(PyObject *d, PyObject *de, char *name, int code)
22+
_inscode(PyObject *d, PyObject *de, const char *name, int code)
2323
{
24-
PyObject *u = PyString_FromString(name);
24+
PyObject *u = PyUnicode_FromString(name);
2525
PyObject *v = PyInt_FromLong((long) code);
2626

2727
/* Don't bother checking for errors; they'll be caught at the end

0 commit comments

Comments
 (0)