Commit 9f8b7c06 authored by Neal Norwitz's avatar Neal Norwitz

Support unicode names

parent 9f6d9579
......@@ -166,8 +166,8 @@ weakref_repr(PyWeakReference *self)
"__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>",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment