summaryrefslogtreecommitdiffstats
path: root/Objects/unicodeobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/unicodeobject.c')
-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);