We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 857e4a5 commit e1204b2Copy full SHA for e1204b2
include/pybind11/detail/internals.h
@@ -794,14 +794,11 @@ PYBIND11_NOINLINE internals &get_internals() {
794
795
inline void ensure_internals() {
796
pybind11::detail::get_internals_pp_manager().unref();
797
-#if PY_VERSION_HEX < 0x03090000
798
- PyInterpreterState *cur_istate = _PyInterpreterState_Get();
799
-#else
800
- PyInterpreterState *cur_istate = PyInterpreterState_Get();
801
-#endif
802
- if (cur_istate != PyInterpreterState_Main()) {
+#ifdef PYBIND11_HAS_SUBINTERPRETER_SUPPORT
+ if (PyInterpreterState_Get() != PyInterpreterState_Main()) {
803
get_multiple_interpreters_seen() = true;
804
}
+#endif
805
pybind11::detail::get_internals();
806
807
0 commit comments