Author: Matti Picus <matti.pi...@gmail.com> Branch: unicode-utf8 Changeset: r95557:aed51041ef67 Date: 2019-01-01 17:30 +0200 http://bitbucket.org/pypy/pypy/changeset/aed51041ef67/
Log: fix MAXUNICODE to 0x10ffff on this branch diff --git a/TODO b/TODO --- a/TODO +++ b/TODO @@ -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 --- a/rpython/rlib/runicode.py +++ b/rpython/rlib/runicode.py @@ -8,7 +8,8 @@ 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: _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit