Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9cead06

Browse filesBrowse files
naschemeMariatta
authored andcommitted
Check that Python is 64-bit before enabling BLAKE2_USE_SSE. (GH-1332) (GH-2042)
(cherry picked from commit 6c991bd)
1 parent 6a90a12 commit 9cead06
Copy full SHA for 9cead06

File tree

1 file changed

+5
-2
lines changed
Filter options

1 file changed

+5
-2
lines changed

‎setup.py

Copy file name to clipboardExpand all lines: setup.py
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -897,8 +897,11 @@ def detect_modules(self):
897897
blake2_deps.append('hashlib.h')
898898

899899
blake2_macros = []
900-
if not cross_compiling and os.uname().machine == "x86_64":
901-
# Every x86_64 machine has at least SSE2.
900+
if (not cross_compiling and
901+
os.uname().machine == "x86_64" and
902+
sys.maxsize > 2**32):
903+
# Every x86_64 machine has at least SSE2. Check for sys.maxsize
904+
# in case that kernel is 64-bit but userspace is 32-bit.
902905
blake2_macros.append(('BLAKE2_USE_SSE', '1'))
903906

904907
exts.append( Extension('_blake2',

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.