From 826b9ddbe367443803c9f34453c3414abb635502 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sun, 10 Jun 2007 21:09:40 +0000 Subject: Fix getclassname. Fixes test_descrtut. --- Objects/classobject.c | 4 ++-- 1 file 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); -- cgit v0.12