cpython: d2c1521ad0a1 (original) (raw)
Mercurial > cpython
changeset 74772:d2c1521ad0a1
_Py_Identifier are always ASCII strings
Victor Stinner victor.stinner@haypocalc.com | |
---|---|
date | Sun, 05 Feb 2012 01:45:45 +0100 |
parents | fd424ccc8cee |
children | b228d9da8bd3 |
files | Objects/unicodeobject.c |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-)[+] [-] Objects/unicodeobject.c 5 |
line wrap: on
line diff
--- 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,[](#l1.7)
strlen(id->string),[](#l1.8)
NULL, NULL);[](#l1.9)
id->object = unicode_fromascii((unsigned char*)id->string,[](#l1.10)
strlen(id->string));[](#l1.11) if (!id->object)[](#l1.12) return NULL;[](#l1.13) PyUnicode_InternInPlace(&id->object);[](#l1.14)