diff options
-rw-r--r-- | TODO | 1 | ||||
-rw-r--r-- | rpython/rlib/runicode.py | 3 |
2 files changed, 3 insertions, 1 deletions
@@ -4,3 +4,4 @@ * improve performance of splitlines * fix _pypyjson to not use a wrapped dict when decoding an object * make sure we review all the places that call ord(unichr) to check for ValueErrors +* Find a more elegant way to define MAXUNICODE in rpython/rlib/runicode.py diff --git a/rpython/rlib/runicode.py b/rpython/rlib/runicode.py index cbbc86ea46..f38c865649 100644 --- a/rpython/rlib/runicode.py +++ b/rpython/rlib/runicode.py @@ -8,7 +8,8 @@ from rpython.rtyper.lltypesystem import lltype, rffi from rpython.rlib import jit, nonconst -if rffi.sizeof(lltype.UniChar) == 4: +# We always use MAXUNICODE = 0x10ffff when unicode objects use utf8 +if 1 or rffi.sizeof(lltype.UniChar) == 4: MAXUNICODE = 0x10ffff allow_surrogate_by_default = False else: |