]> granicus.if.org Git - python/commitdiff
Use unicode for the errno.errorcode names
authorNeal Norwitz <nnorwitz@gmail.com>
Fri, 24 Aug 2007 00:10:00 +0000 (00:10 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Fri, 24 Aug 2007 00:10:00 +0000 (00:10 +0000)
Modules/errnomodule.c

index 696d396b07ad8dcae16a9de979e339eee8963e1e..21dfe1d3b5d721dffcd03754d954d086530fcfc7 100644 (file)
@@ -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