fix: allow subinterp support to be disabled

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
This commit is contained in:
Henry Schreiner
2025-05-30 21:11:27 -04:00
committed by Henry Schreiner
parent 33fb53335e
commit e4873e8f59
8 changed files with 23 additions and 11 deletions

View File

@@ -9,4 +9,5 @@ namespace py = pybind11;
PYBIND11_MODULE(mod_shared_interpreter_gil, m, py::multiple_interpreters::shared_gil()) {
m.def("internals_at",
[]() { return reinterpret_cast<uintptr_t>(&py::detail::get_internals()); });
m.attr("PYBIND11_HAS_SUBINTERPRETER_SUPPORT") = PYBIND11_HAS_SUBINTERPRETER_SUPPORT;
}