diff options
author | Victor Stinner <vstinner@python.org> | 2023-08-21 17:15:52 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-21 17:15:52 (GMT) |
commit | 21c0844742cf15db8e56e8848ecbb2e25f314aed (patch) | |
tree | 67737687dce08f38f3f4048c2142ec35a253fe3c /Modules/zlibmodule.c | |
parent | db55383829ccd5ce80c551d60f26851346741fdf (diff) | |
download | cpython-21c0844742cf15db8e56e8848ecbb2e25f314aed.zip cpython-21c0844742cf15db8e56e8848ecbb2e25f314aed.tar.gz cpython-21c0844742cf15db8e56e8848ecbb2e25f314aed.tar.bz2 |
gh-108220: Internal header files require Py_BUILD_CORE to be defined (#108221)
* pycore_intrinsics.h does nothing if included twice
(add #ifndef and #define).
* Update Tools/cases_generator/generate_cases.py to generate the
Py_BUILD_CORE test.
* _bz2, _lzma, _opcode and zlib extensions now define the
Py_BUILD_CORE_MODULE macro to use internal headers
(pycore_code.h, pycore_intrinsics.h and pycore_blocks_output_buffer.h).
Diffstat (limited to 'Modules/zlibmodule.c')
-rw-r--r-- | Modules/zlibmodule.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/zlibmodule.c b/Modules/zlibmodule.c index a98a37a..9b76afa 100644 --- a/Modules/zlibmodule.c +++ b/Modules/zlibmodule.c @@ -3,6 +3,10 @@ /* Windows users: read Python's PCbuild\readme.txt */ +#ifndef Py_BUILD_CORE_BUILTIN +# define Py_BUILD_CORE_MODULE 1 +#endif + #include "Python.h" #include "zlib.h" |