summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2012-10-14 02:17:50 (GMT)
committerChristian Heimes <christian@cheimes.de>2012-10-14 02:17:50 (GMT)
commit12e6a53b99298f8bb8ad00bf2f0ad22f78e92ae6 (patch)
treefbec7de2ccede89b93b0d224ca96e2dcab8a3e87
parentd376986014ab76dfa78916a933bd45098c0bd7c6 (diff)
downloadcpython-12e6a53b99298f8bb8ad00bf2f0ad22f78e92ae6.zip
cpython-12e6a53b99298f8bb8ad00bf2f0ad22f78e92ae6.tar.gz
cpython-12e6a53b99298f8bb8ad00bf2f0ad22f78e92ae6.tar.bz2
get 64bit platforms without uint64 right again
-rw-r--r--Modules/_sha3/sha3module.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/Modules/_sha3/sha3module.c b/Modules/_sha3/sha3module.c
index 38bda75..ac568b8 100644
--- a/Modules/_sha3/sha3module.c
+++ b/Modules/_sha3/sha3module.c
@@ -98,9 +98,11 @@
#ifdef __sparc
/* On SPARC with Solaris CC opt64 fails with 'invalid address alignment' */
#define KeccakOpt 32
-#elif SIZEOF_VOID_P == 8
+#elif SIZEOF_VOID_P == 8 && defined(PY_UINT64_T)
+ /* opt64 works only for 64bit platforms with unsigned int64 */
#define KeccakOpt 64
-#elif SIZEOF_VOID_P == 4
+#else
+ /* opt32 is used for the remaining 32 and 64bit platforms */
#define KeccakOpt 32
#endif
@@ -109,7 +111,7 @@
#define Unrolling 24
#define UseBebigokimisa
typedef PY_UINT64_T UINT64;
-#elif KeccakOpt == 32 && defined(PY_UINT64_T)
+#elif KeccakOpt == 32 && defined(PY_UINT64_T)
/* 32bit platforms with unsigned int64 */
#define Unrolling 2
#define UseSchedule 3