diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2012-02-07 22:05:55 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2012-02-07 22:05:55 (GMT) |
commit | d1cd99b533a32e063fc4602c439da334d5a10331 (patch) | |
tree | cf5196b1b50a759e136a295a9c20a81316f4443d /Objects | |
parent | cae1068e82229129f1928b37b85e71e24d1ab0a2 (diff) | |
download | cpython-d1cd99b533a32e063fc4602c439da334d5a10331.zip cpython-d1cd99b533a32e063fc4602c439da334d5a10331.tar.gz cpython-d1cd99b533a32e063fc4602c439da334d5a10331.tar.bz2 |
Backout d2c1521ad0a1: _Py_IDENTIFIER() uses UTF-8 again
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/unicodeobject.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index f13a1de..67336bf 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -1744,8 +1744,9 @@ PyObject * _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); |