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 /Include/internal/pycore_code.h | |
| 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 'Include/internal/pycore_code.h')
| -rw-r--r-- | Include/internal/pycore_code.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Include/internal/pycore_code.h b/Include/internal/pycore_code.h index 0009937..f5127a8 100644 --- a/Include/internal/pycore_code.h +++ b/Include/internal/pycore_code.h @@ -4,6 +4,10 @@ extern "C" { #endif +#ifndef Py_BUILD_CORE +# error "this header requires Py_BUILD_CORE define" +#endif + #define CODE_MAX_WATCHERS 8 /* PEP 659 |
