aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Lib/sre_compile.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/sre_compile.py b/Lib/sre_compile.py
index 5ecd33a77bb..f5aef7a2e5f 100644
--- a/Lib/sre_compile.py
+++ b/Lib/sre_compile.py
@@ -382,8 +382,7 @@ def _mk_bitmap(bits, _CODEBITS=_CODEBITS, _int=int):
def _bytes_to_codes(b):
# Convert block indices to word array
- import array
- a = array.array('I', b)
+ a = memoryview(b).cast('I')
assert a.itemsize == _sre.CODESIZE
assert len(a) * a.itemsize == len(b)
return a.tolist()