diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2007-06-10 21:09:40 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2007-06-10 21:09:40 (GMT) |
commit | 826b9ddbe367443803c9f34453c3414abb635502 (patch) | |
tree | f5c176b82e54296622965f595ebe82fdf1c975c5 /Objects | |
parent | 5b222135f8d2492713994f2cb003980e87ce6a72 (diff) | |
download | cpython-826b9ddbe367443803c9f34453c3414abb635502.zip cpython-826b9ddbe367443803c9f34453c3414abb635502.tar.gz cpython-826b9ddbe367443803c9f34453c3414abb635502.tar.bz2 |
Fix getclassname. Fixes test_descrtut.
Diffstat (limited to 'Objects')
-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); |