mirror of
https://github.com/pybind/pybind11.git
synced 2026-04-20 06:49:25 +00:00
fix: follow rest of pybind11 closer with PYBIND11_HAS_SUBINTERPRETER_SUPPORT (#5710)
* fix: follow rest of pybind11 closer with PYBIND11_HAS_SUBINTERPRETER_SUPPORT Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * style: pre-commit fixes --------- Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -9,5 +9,9 @@ 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;
|
||||
#ifdef PYBIND11_HAS_SUBINTERPRETER_SUPPORT
|
||||
m.attr("defined_PYBIND11_HAS_SUBINTERPRETER_SUPPORT") = true;
|
||||
#else
|
||||
m.attr("defined_PYBIND11_HAS_SUBINTERPRETER_SUPPORT") = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user