diff options
author | Matti Picus <matti.picus@gmail.com> | 2019-01-01 17:30:06 +0200 |
---|---|---|
committer | Matti Picus <matti.picus@gmail.com> | 2019-01-01 17:30:06 +0200 |
commit | ae7118fba0c12a25ac42cc7c91344be1139beb28 (patch) | |
tree | 3c34caf6aa2d41a0b757c417b87e26645a2c1a4b | |
parent | typo (diff) | |
download | pypy-ae7118fba0c12a25ac42cc7c91344be1139beb28.tar.gz pypy-ae7118fba0c12a25ac42cc7c91344be1139beb28.tar.bz2 pypy-ae7118fba0c12a25ac42cc7c91344be1139beb28.zip |
fix MAXUNICODE to 0x10ffff on this branch
-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: |