Mercurial > cpython-lru_cache-weakref
diff Objects/unicodeobject.c @ 41622:107aacb9c595
When creating a unicode object from a char * characters
are always < 256 => remove the test.
| author | Walter Dörwald <walter@livinglogic.de> |
|---|---|
| date | Sat, 05 May 2007 14:21:20 +0000 |
| parents | 61acfb831633 |
| children | 6bc156d3c00e |
line wrap: on
line diff
--- a/Objects/unicodeobject.c Sat May 05 14:12:24 2007 +0000 +++ b/Objects/unicodeobject.c Sat May 05 14:21:20 2007 +0000 @@ -408,9 +408,8 @@ return (PyObject *)unicode_empty; } - /* Single character Unicode objects in the Latin-1 range are - shared when using this constructor */ - if (size == 1 && *u < 256) { + /* Single characters are shared when using this constructor */ + if (size == 1) { unicode = unicode_latin1[*u]; if (!unicode) { unicode = _PyUnicode_New(1);
