Mercurial > cpython-lru_cache-weakref
diff Objects/unicodeobject.c @ 74819:e2e7e372c293
Backout d2c1521ad0a1: _Py_IDENTIFIER() uses UTF-8 again
| author | Victor Stinner <victor.stinner@haypocalc.com> |
|---|---|
| date | Tue, 07 Feb 2012 23:05:55 +0100 |
| parents | d2c1521ad0a1 |
| children | af1a9508f7fa |
line wrap: on
line diff
--- a/Objects/unicodeobject.c Tue Feb 07 09:40:33 2012 -0500 +++ b/Objects/unicodeobject.c Tue Feb 07 23:05:55 2012 +0100 @@ -1744,8 +1744,9 @@ _PyUnicode_FromId(_Py_Identifier *id) { if (!id->object) { - id->object = unicode_fromascii((unsigned char*)id->string, - strlen(id->string)); + id->object = PyUnicode_DecodeUTF8Stateful(id->string, + strlen(id->string), + NULL, NULL); if (!id->object) return NULL; PyUnicode_InternInPlace(&id->object);
