diff options
author | Christian Heimes <christian@python.org> | 2021-10-22 16:36:28 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-22 15:36:28 +0200 |
commit | 03e9f5dc751b8c441a85f428abc3f432ffe46345 (patch) | |
tree | 3ea47646a3402f2ad8bdda2366bd9a214899ff44 /Modules/_math.c | |
parent | 86dfb55d2e091cf633dbd7aabcd49d96fb1f9d81 (diff) | |
download | cpython-git-03e9f5dc751b8c441a85f428abc3f432ffe46345.tar.gz |
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 <christian@python.org>
Diffstat (limited to 'Modules/_math.c')
-rw-r--r-- | Modules/_math.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/_math.c b/Modules/_math.c index 68e3a23469..c1936a1088 100644 --- a/Modules/_math.c +++ b/Modules/_math.c @@ -1,6 +1,10 @@ /* Definitions of some C99 math library functions, for those platforms that don't implement these functions already. */ +#ifndef Py_BUILD_CORE_BUILTIN +# define Py_BUILD_CORE_MODULE 1 +#endif + #include "Python.h" #include <float.h> #include "_math.h" |