diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2012-02-05 00:45:45 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2012-02-05 00:45:45 (GMT) |
commit | d446d8e09a76ce0009d76e2b0c1729e1be7c7da8 (patch) | |
tree | c4fe4319b8537733bd03072ea745a36758aefb01 /Objects | |
parent | e15ad2ff55480528fa76bb2330f4424e5cd5ea7b (diff) | |
download | cpython-d446d8e09a76ce0009d76e2b0c1729e1be7c7da8.zip cpython-d446d8e09a76ce0009d76e2b0c1729e1be7c7da8.tar.gz cpython-d446d8e09a76ce0009d76e2b0c1729e1be7c7da8.tar.bz2 |
_Py_Identifier are always ASCII strings
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/unicodeobject.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 67336bf..f13a1de 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -1744,9 +1744,8 @@ PyObject * _PyUnicode_FromId(_Py_Identifier *id) { if (!id->object) { - id->object = PyUnicode_DecodeUTF8Stateful(id->string, - strlen(id->string), - NULL, NULL); + id->object = unicode_fromascii((unsigned char*)id->string, + strlen(id->string)); if (!id->object) return NULL; PyUnicode_InternInPlace(&id->object); |