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>",
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins

Reply via email to