[Python-checkins] r55149 - python/branches/py3k-struni/Objects/unicodeobject.c
walter.doerwald
python-checkins at python.org
Sat May 5 16:21:23 CEST 2007
Author: walter.doerwald
Date: Sat May 5 16:21:20 2007
New Revision: 55149
Modified:
python/branches/py3k-struni/Objects/unicodeobject.c
Log:
When creating a unicode object from a char * characters
are always < 256 => remove the test.
Modified: python/branches/py3k-struni/Objects/unicodeobject.c
==============================================================================
--- python/branches/py3k-struni/Objects/unicodeobject.c (original)
+++ python/branches/py3k-struni/Objects/unicodeobject.c Sat May 5 16:21:20 2007
@@ -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);
More information about the Python-checkins
mailing list