From: Serhiy Storchaka Date: Mon, 10 Nov 2014 11:24:47 +0000 (+0200) Subject: Got rid of the array module dependency in the re module. X-Git-Tag: v3.4.3rc1~337 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=19e9158497728e522f315777da1cd957a8736c20;p=thirdparty%2FPython%2Fcpython.git Got rid of the array module dependency in the re module. The re module could be used during building before array is built. --- diff --git a/Lib/sre_compile.py b/Lib/sre_compile.py index 53baa0dc468a..550ea158afd6 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()