summaryrefslogtreecommitdiffstats
path: root/Lib/sre_compile.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-10-24 19:02:58 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2013-10-24 19:02:58 (GMT)
commitbe80fc9a843e3c51d1030d3eab52d6287e5aef3a (patch)
treeeb5b7b5fd1dcf66a70a7cc566772d7ad581dbeb9 /Lib/sre_compile.py
parentb82a3dc2409e68dbd20d1991ba2e9d1c490c67a3 (diff)
downloadcpython-be80fc9a843e3c51d1030d3eab52d6287e5aef3a.zip
cpython-be80fc9a843e3c51d1030d3eab52d6287e5aef3a.tar.gz
cpython-be80fc9a843e3c51d1030d3eab52d6287e5aef3a.tar.bz2
Issue #19327: Fixed the working of regular expressions with too big charset.
Diffstat (limited to 'Lib/sre_compile.py')
-rw-r--r--Lib/sre_compile.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/sre_compile.py b/Lib/sre_compile.py
index b6b377f..a80c74d 100644
--- a/Lib/sre_compile.py
+++ b/Lib/sre_compile.py
@@ -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