summaryrefslogtreecommitdiffstats
path: root/Lib/sre_compile.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2014-11-10 11:24:47 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2014-11-10 11:24:47 (GMT)
commit19e9158497728e522f315777da1cd957a8736c20 (patch)
tree2f690303d4cecb54c7b0bab949aed022c985215d /Lib/sre_compile.py
parent0c938f6d248e7dbf50a1f00b0c6bca3845859fc0 (diff)
downloadcpython-19e9158497728e522f315777da1cd957a8736c20.zip
cpython-19e9158497728e522f315777da1cd957a8736c20.tar.gz
cpython-19e9158497728e522f315777da1cd957a8736c20.tar.bz2
Got rid of the array module dependency in the re module.
The re module could be used during building before array is built.
Diffstat (limited to 'Lib/sre_compile.py')
-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 53baa0d..550ea15 100644
--- a/Lib/sre_compile.py
+++ b/Lib/sre_compile.py
@@ -410,8 +410,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()