mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Issue #19327: Fixed the working of regular expressions with too big charset.
This commit is contained in:
parent
b82a3dc240
commit
be80fc9a84
4 changed files with 8 additions and 3 deletions
|
@ -345,7 +345,7 @@ def _optimize_unicode(charset, fixup):
|
|||
else:
|
||||
code = 'I'
|
||||
# Convert block indices to byte array of 256 bytes
|
||||
mapping = array.array('b', mapping).tobytes()
|
||||
mapping = array.array('B', mapping).tobytes()
|
||||
# Convert byte array to word array
|
||||
mapping = array.array(code, mapping)
|
||||
assert mapping.itemsize == _sre.CODESIZE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue