summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
Diffstat (limited to 'Include')
-rw-r--r--Include/internal/pycore_blocks_output_buffer.h6
-rw-r--r--Include/internal/pycore_code.h4
-rw-r--r--Include/internal/pycore_codecs.h4
-rw-r--r--Include/internal/pycore_emscripten_signal.h4
-rw-r--r--Include/internal/pycore_fileutils.h2
-rw-r--r--Include/internal/pycore_fileutils_windows.h2
-rw-r--r--Include/internal/pycore_frame.h4
-rw-r--r--Include/internal/pycore_import.h4
-rw-r--r--Include/internal/pycore_instruments.h4
-rw-r--r--Include/internal/pycore_intrinsics.h8
-rw-r--r--Include/internal/pycore_opcode_metadata.h4
11 files changed, 42 insertions, 4 deletions
diff --git a/Include/internal/pycore_blocks_output_buffer.h b/Include/internal/pycore_blocks_output_buffer.h
index 28cf6fb..573e103 100644
--- a/Include/internal/pycore_blocks_output_buffer.h
+++ b/Include/internal/pycore_blocks_output_buffer.h
@@ -40,6 +40,10 @@ extern "C" {
#include "Python.h"
+#ifndef Py_BUILD_CORE
+# error "this header requires Py_BUILD_CORE define"
+#endif
+
typedef struct {
// List of bytes objects
PyObject *list;
@@ -314,4 +318,4 @@ _BlocksOutputBuffer_OnError(_BlocksOutputBuffer *buffer)
#ifdef __cplusplus
}
#endif
-#endif /* Py_INTERNAL_BLOCKS_OUTPUT_BUFFER_H */ \ No newline at end of file
+#endif /* Py_INTERNAL_BLOCKS_OUTPUT_BUFFER_H */
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
diff --git a/Include/internal/pycore_codecs.h b/Include/internal/pycore_codecs.h
index a246519..a2a7151 100644
--- a/Include/internal/pycore_codecs.h
+++ b/Include/internal/pycore_codecs.h
@@ -4,6 +4,10 @@
extern "C" {
#endif
+#ifndef Py_BUILD_CORE
+# error "this header requires Py_BUILD_CORE define"
+#endif
+
extern PyObject* _PyCodec_Lookup(const char *encoding);
/* Text codec specific encoding and decoding API.
diff --git a/Include/internal/pycore_emscripten_signal.h b/Include/internal/pycore_emscripten_signal.h
index 8b3287d..d1bcb9a 100644
--- a/Include/internal/pycore_emscripten_signal.h
+++ b/Include/internal/pycore_emscripten_signal.h
@@ -3,6 +3,10 @@
#if defined(__EMSCRIPTEN__)
+#ifndef Py_BUILD_CORE
+# error "this header requires Py_BUILD_CORE define"
+#endif
+
void
_Py_CheckEmscriptenSignals(void);
diff --git a/Include/internal/pycore_fileutils.h b/Include/internal/pycore_fileutils.h
index 0ed139f..25b383b 100644
--- a/Include/internal/pycore_fileutils.h
+++ b/Include/internal/pycore_fileutils.h
@@ -5,7 +5,7 @@ extern "C" {
#endif
#ifndef Py_BUILD_CORE
-# error "Py_BUILD_CORE must be defined to include this header"
+# error "this header requires Py_BUILD_CORE define"
#endif
#include <locale.h> /* struct lconv */
diff --git a/Include/internal/pycore_fileutils_windows.h b/Include/internal/pycore_fileutils_windows.h
index e804d38..b79aa9f 100644
--- a/Include/internal/pycore_fileutils_windows.h
+++ b/Include/internal/pycore_fileutils_windows.h
@@ -5,7 +5,7 @@ extern "C" {
#endif
#ifndef Py_BUILD_CORE
-# error "Py_BUILD_CORE must be defined to include this header"
+# error "this header requires Py_BUILD_CORE define"
#endif
#ifdef MS_WINDOWS
diff --git a/Include/internal/pycore_frame.h b/Include/internal/pycore_frame.h
index 0dc2a18..ae77367 100644
--- a/Include/internal/pycore_frame.h
+++ b/Include/internal/pycore_frame.h
@@ -4,6 +4,10 @@
extern "C" {
#endif
+#ifndef Py_BUILD_CORE
+# error "this header requires Py_BUILD_CORE define"
+#endif
+
#include <stdbool.h>
#include <stddef.h> // offsetof()
#include "pycore_code.h" // STATS
diff --git a/Include/internal/pycore_import.h b/Include/internal/pycore_import.h
index 077508e..34f572b 100644
--- a/Include/internal/pycore_import.h
+++ b/Include/internal/pycore_import.h
@@ -5,6 +5,10 @@
extern "C" {
#endif
+#ifndef Py_BUILD_CORE
+# error "this header requires Py_BUILD_CORE define"
+#endif
+
#include "pycore_hashtable.h" // _Py_hashtable_t
#include "pycore_time.h" // _PyTime_t
diff --git a/Include/internal/pycore_instruments.h b/Include/internal/pycore_instruments.h
index 56de9f8..e15447a 100644
--- a/Include/internal/pycore_instruments.h
+++ b/Include/internal/pycore_instruments.h
@@ -1,7 +1,9 @@
-
#ifndef Py_INTERNAL_INSTRUMENT_H
#define Py_INTERNAL_INSTRUMENT_H
+#ifndef Py_BUILD_CORE
+# error "this header requires Py_BUILD_CORE define"
+#endif
#include "pycore_bitutils.h" // _Py_popcount32
#include "pycore_frame.h"
diff --git a/Include/internal/pycore_intrinsics.h b/Include/internal/pycore_intrinsics.h
index 37d4efc..3a8dd95 100644
--- a/Include/internal/pycore_intrinsics.h
+++ b/Include/internal/pycore_intrinsics.h
@@ -1,3 +1,9 @@
+#ifndef Py_INTERNAL_INTRINSIC_H
+#define Py_INTERNAL_INTRINSIC_H
+
+#ifndef Py_BUILD_CORE
+# error "this header requires Py_BUILD_CORE define"
+#endif
/* Unary Functions: */
#define INTRINSIC_1_INVALID 0
@@ -40,3 +46,5 @@ typedef struct {
extern const intrinsic_func1_info _PyIntrinsics_UnaryFunctions[];
extern const intrinsic_func2_info _PyIntrinsics_BinaryFunctions[];
+
+#endif // !Py_INTERNAL_INTRINSIC_H
diff --git a/Include/internal/pycore_opcode_metadata.h b/Include/internal/pycore_opcode_metadata.h
index 396d194..fab91e6 100644
--- a/Include/internal/pycore_opcode_metadata.h
+++ b/Include/internal/pycore_opcode_metadata.h
@@ -3,6 +3,10 @@
// Python/bytecodes.c
// Do not edit!
+#ifndef Py_BUILD_CORE
+# error "this header requires Py_BUILD_CORE define"
+#endif
+
#include <stdbool.h>