Commit d446d8e0 authored by Victor Stinner's avatar Victor Stinner

_Py_Identifier are always ASCII strings

parent e15ad2ff
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment