[Python-3000-checkins] r57460 - python/branches/py3k/Objects/weakrefobject.c
neal.norwitz
python-3000-checkins at python.org
Sat Aug 25 10:13:41 CEST 2007
Author: neal.norwitz
Date: Sat Aug 25 10:13:40 2007
New Revision: 57460
Modified:
python/branches/py3k/Objects/weakrefobject.c
Log:
Support unicode names
Modified: python/branches/py3k/Objects/weakrefobject.c
==============================================================================
--- python/branches/py3k/Objects/weakrefobject.c (original)
+++ python/branches/py3k/Objects/weakrefobject.c Sat Aug 25 10:13:40 2007
@@ -166,8 +166,8 @@
"__name__");
if (nameobj == NULL)
PyErr_Clear();
- else if (PyString_Check(nameobj))
- name = PyString_AS_STRING(nameobj);
+ else if (PyUnicode_Check(nameobj))
+ name = PyUnicode_AsString(nameobj);
PyOS_snprintf(buffer, sizeof(buffer),
name ? "<weakref at %p; to '%.50s' at %p (%s)>"
: "<weakref at %p; to '%.50s' at %p>",
More information about the Python-3000-checkins
mailing list