diff options
Diffstat (limited to 'Modules/_blake2/blake2b_impl.c')
-rw-r--r-- | Modules/_blake2/blake2b_impl.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Modules/_blake2/blake2b_impl.c b/Modules/_blake2/blake2b_impl.c index e1421dd..c2cac98 100644 --- a/Modules/_blake2/blake2b_impl.c +++ b/Modules/_blake2/blake2b_impl.c @@ -21,14 +21,9 @@ #include "pycore_strhex.h" // _Py_strhex() #include "../hashlib.h" -#include "blake2ns.h" - -#define HAVE_BLAKE2B 1 -#define BLAKE2_LOCAL_INLINE(type) Py_LOCAL_INLINE(type) - -#include "impl/blake2.h" -#include "impl/blake2-impl.h" /* for secure_zero_memory() and store48() */ +#include "blake2module.h" +#ifndef HAVE_LIBB2 /* pure SSE2 implementation is very slow, so only use the more optimized SSSE3+ * https://bugs.python.org/issue31834 */ #if defined(__SSSE3__) || defined(__SSE4_1__) || defined(__AVX__) || defined(__XOP__) @@ -36,10 +31,13 @@ #else #include "impl/blake2b-ref.c" #endif +#endif // !HAVE_LIBB2 +#define HAVE_BLAKE2B 1 extern PyType_Spec blake2b_type_spec; + typedef struct { PyObject_HEAD blake2b_param param; |