summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2007-05-05 14:21:20 (GMT)
committerWalter Dörwald <walter@livinglogic.de>2007-05-05 14:21:20 (GMT)
commit071b9da1469e30306fc91d6e26d12c4a8b1f10f8 (patch)
tree7c015b4f93be47bcbdaf83af28bccab5996eb5fb /Objects
parentdb290f0162bb4c51a07a970c8c5cd61a80f48e71 (diff)
downloadcpython-071b9da1469e30306fc91d6e26d12c4a8b1f10f8.zip
cpython-071b9da1469e30306fc91d6e26d12c4a8b1f10f8.tar.gz
cpython-071b9da1469e30306fc91d6e26d12c4a8b1f10f8.tar.bz2
When creating a unicode object from a char * characters
are always < 256 => remove the test.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/unicodeobject.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index c9a922d..4599414 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -408,9 +408,8 @@ PyObject *PyUnicode_FromString(const char *u)
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);