summaryrefslogtreecommitdiffstats
path: root/Modules/_blake2/blake2s_impl.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_blake2/blake2s_impl.c')
-rw-r--r--Modules/_blake2/blake2s_impl.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/Modules/_blake2/blake2s_impl.c b/Modules/_blake2/blake2s_impl.c
index 4812730..1c47328 100644
--- a/Modules/_blake2/blake2s_impl.c
+++ b/Modules/_blake2/blake2s_impl.c
@@ -21,14 +21,9 @@
#include "pycore_strhex.h" // _Py_strhex()
#include "../hashlib.h"
-#include "blake2ns.h"
-
-#define HAVE_BLAKE2S 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/blake2s-ref.c"
#endif
+#endif // !HAVE_LIBB2
+#define HAVE_BLAKE2S 1
extern PyType_Spec blake2s_type_spec;
+
typedef struct {
PyObject_HEAD
blake2s_param param;