From 03e9f5dc751b8c441a85f428abc3f432ffe46345 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Fri, 22 Oct 2021 16:36:28 +0300 Subject: bpo-43974: Move Py_BUILD_CORE_MODULE into module code (GH-29157) setup.py no longer defines Py_BUILD_CORE_MODULE. Instead every module defines the macro before #include "Python.h" unless Py_BUILD_CORE_BUILTIN is already defined. Py_BUILD_CORE_BUILTIN is defined for every module that is built by Modules/Setup. The PR also simplifies Modules/Setup. Makefile and makesetup already define Py_BUILD_CORE_BUILTIN and include Modules/internal for us. Signed-off-by: Christian Heimes --- Modules/_blake2/blake2b_impl.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Modules/_blake2/blake2b_impl.c') diff --git a/Modules/_blake2/blake2b_impl.c b/Modules/_blake2/blake2b_impl.c index b16324e8f7..e1421dd8ff 100644 --- a/Modules/_blake2/blake2b_impl.c +++ b/Modules/_blake2/blake2b_impl.c @@ -13,6 +13,10 @@ * The blake2s_impl.c is autogenerated from blake2b_impl.c. */ +#ifndef Py_BUILD_CORE_BUILTIN +# define Py_BUILD_CORE_MODULE 1 +#endif + #include "Python.h" #include "pycore_strhex.h" // _Py_strhex() -- cgit v1.2.1