Issue #19327: Fixed the working of regular expressions with too big charset.

This commit is contained in:
Serhiy Storchaka 2013-10-24 22:02:58 +03:00
parent b82a3dc240
commit be80fc9a84
4 changed files with 8 additions and 3 deletions

View file

@ -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