[Python-checkins] cpython: Backout d2c1521ad0a1: _Py_IDENTIFIER() uses UTF-8 again
victor.stinner
python-checkins at python.org
Tue Feb 7 23:05:25 CET 2012
http://hg.python.org/cpython/rev/e2e7e372c293
changeset: 74819:e2e7e372c293
user: Victor Stinner <victor.stinner at haypocalc.com>
date: Tue Feb 07 23:05:55 2012 +0100
summary:
Backout d2c1521ad0a1: _Py_IDENTIFIER() uses UTF-8 again
files:
Objects/unicodeobject.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -1744,8 +1744,9 @@
_PyUnicode_FromId(_Py_Identifier *id)
{
if (!id->object) {
- id->object = unicode_fromascii((unsigned char*)id->string,
- strlen(id->string));
+ id->object = PyUnicode_DecodeUTF8Stateful(id->string,
+ strlen(id->string),
+ NULL, NULL);
if (!id->object)
return NULL;
PyUnicode_InternInPlace(&id->object);
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list