File tree 4 files changed +8
-8
lines changed
4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 232
232
# define PYBIND11_ASSERT_GIL_HELD_INCREF_DECREF
233
233
#endif
234
234
235
- // Slightly faster code paths are available when PYBIND11_SUBINTERPRETER_SUPPORT is *not* defined,
236
- // so avoid defining it for implementations that do not support subinterpreters.
237
- // However, defining it unnecessarily is not expected to break anything.
235
+ // Slightly faster code paths are available when PYBIND11_HAS_SUBINTERPRETER_SUPPORT is *not*
236
+ // defined, so avoid defining it for implementations that do not support subinterpreters. However,
237
+ // defining it unnecessarily is not expected to break anything.
238
238
#if PY_VERSION_HEX >= 0x030C0000 && !defined(PYPY_VERSION) && !defined(GRAALVM_PYTHON)
239
- # define PYBIND11_SUBINTERPRETER_SUPPORT
239
+ # define PYBIND11_HAS_SUBINTERPRETER_SUPPORT
240
240
#endif
241
241
242
242
// 3.12 Compatibility
Original file line number Diff line number Diff line change @@ -324,7 +324,7 @@ inline std::atomic<int> &get_num_interpreters_seen() {
324
324
325
325
template <typename InternalsType>
326
326
inline std::unique_ptr<InternalsType> *&get_internals_pp () {
327
- #ifdef PYBIND11_SUBINTERPRETER_SUPPORT
327
+ #ifdef PYBIND11_HAS_SUBINTERPRETER_SUPPORT
328
328
if (get_num_interpreters_seen () > 1 ) {
329
329
// Internals is one per interpreter. When multiple interpreters are alive in different
330
330
// threads we have to allow them to have different internals, so we need a thread_local.
Original file line number Diff line number Diff line change 15
15
16
16
#include < stdexcept>
17
17
18
- #if !defined(PYBIND11_SUBINTERPRETER_SUPPORT )
18
+ #if !defined(PYBIND11_HAS_SUBINTERPRETER_SUPPORT )
19
19
# error "This platform does not support subinterpreters, do not include this file."
20
20
#endif
21
21
Original file line number Diff line number Diff line change 1
1
#include < pybind11/embed.h>
2
- #ifdef PYBIND11_SUBINTERPRETER_SUPPORT
2
+ #ifdef PYBIND11_HAS_SUBINTERPRETER_SUPPORT
3
3
# include < pybind11/subinterpreter.h>
4
4
5
5
// Silence MSVC C++17 deprecation warning from Catch regarding std::uncaught_exceptions (up to
@@ -428,4 +428,4 @@ TEST_CASE("Per-Subinterpreter GIL") {
428
428
}
429
429
# endif // Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
430
430
431
- #endif // PYBIND11_SUBINTERPRETER_SUPPORT
431
+ #endif // PYBIND11_HAS_SUBINTERPRETER_SUPPORT
You can’t perform that action at this time.
0 commit comments