mirror of
https://github.com/python/cpython.git
synced 2025-07-12 13:55:34 +00:00
#13054: fix usage of sys.maxunicode after PEP-393.
This commit is contained in:
parent
b7591d4780
commit
a9860aeb08
7 changed files with 15 additions and 38 deletions
|
@ -318,11 +318,13 @@ def _optimize_unicode(charset, fixup):
|
|||
# XXX: could expand category
|
||||
return charset # cannot compress
|
||||
except IndexError:
|
||||
# non-BMP characters
|
||||
# non-BMP characters; XXX now they should work
|
||||
return charset
|
||||
if negate:
|
||||
if sys.maxunicode != 65535:
|
||||
# XXX: negation does not work with big charsets
|
||||
# XXX2: now they should work, but removing this will make the
|
||||
# charmap 17 times bigger
|
||||
return charset
|
||||
for i in range(65536):
|
||||
charmap[i] = not charmap[i]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue