mirror of https://github.com/python/cpython.git
_Py_Identifier are always ASCII strings
This commit is contained in:
parent
e15ad2ff55
commit
d446d8e09a
|
@ -1744,9 +1744,8 @@ PyObject *
|
||||||
_PyUnicode_FromId(_Py_Identifier *id)
|
_PyUnicode_FromId(_Py_Identifier *id)
|
||||||
{
|
{
|
||||||
if (!id->object) {
|
if (!id->object) {
|
||||||
id->object = PyUnicode_DecodeUTF8Stateful(id->string,
|
id->object = unicode_fromascii((unsigned char*)id->string,
|
||||||
strlen(id->string),
|
strlen(id->string));
|
||||||
NULL, NULL);
|
|
||||||
if (!id->object)
|
if (!id->object)
|
||||||
return NULL;
|
return NULL;
|
||||||
PyUnicode_InternInPlace(&id->object);
|
PyUnicode_InternInPlace(&id->object);
|
||||||
|
|
Loading…
Reference in New Issue