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:
@@ -12,5 +12,9 @@ PYBIND11_MODULE(mod_per_interpreter_gil,
|
||||
py::multiple_interpreters::per_interpreter_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