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/_bz2module.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/_bz2module.c')
-rw-r--r-- | Modules/_bz2module.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/_bz2module.c b/Modules/_bz2module.c index 0a84f25..3d0d4ee 100644 --- a/Modules/_bz2module.c +++ b/Modules/_bz2module.c @@ -1,5 +1,9 @@ /* _bz2 - Low-level Python interface to libbzip2. */ +#ifndef Py_BUILD_CORE_BUILTIN +# define Py_BUILD_CORE_MODULE 1 +#endif + #include "Python.h" #include <bzlib.h> |