Mercurial > cpython-lru_cache-weakref
diff Modules/_sha3/sha3module.c @ 79719:568312ea04fa
get 64bit platforms without uint64 right again
| author | Christian Heimes <christian@cheimes.de> |
|---|---|
| date | Sun, 14 Oct 2012 04:17:50 +0200 |
| parents | b397b0c08f69 |
| children | 3cfe50908fbd |
line wrap: on
line diff
--- a/Modules/_sha3/sha3module.c Sun Oct 14 02:53:40 2012 +0200 +++ b/Modules/_sha3/sha3module.c Sun Oct 14 04:17:50 2012 +0200 @@ -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
