diff options
Diffstat (limited to 'Objects/classobject.c')
-rw-r--r-- | Objects/classobject.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/classobject.c b/Objects/classobject.c index 3cf64de..2dcc88f 100644 --- a/Objects/classobject.c +++ b/Objects/classobject.c @@ -313,8 +313,8 @@ getclassname(PyObject *klass, char *buf, int bufsize) PyErr_Clear(); return; } - if (PyString_Check(name)) { - strncpy(buf, PyString_AS_STRING(name), bufsize); + if (PyUnicode_Check(name)) { + strncpy(buf, PyUnicode_AsString(name), bufsize); buf[bufsize-1] = '\0'; } Py_DECREF(name); |