summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2012-02-05 00:45:45 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2012-02-05 00:45:45 (GMT)
commitd446d8e09a76ce0009d76e2b0c1729e1be7c7da8 (patch)
treec4fe4319b8537733bd03072ea745a36758aefb01 /Objects
parente15ad2ff55480528fa76bb2330f4424e5cd5ea7b (diff)
downloadcpython-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.c5
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);