MCPcopy Create free account
hub / github.com/pybind/pybind11 / PYBIND11_MODULE

Function PYBIND11_MODULE

tests/mod_shared_interpreter_gil.cpp:9–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7 */
8
9PYBIND11_MODULE(mod_shared_interpreter_gil, m, py::multiple_interpreters::shared_gil()) {
10 m.def("internals_at",
11 []() { return reinterpret_cast<uintptr_t>(&py::detail::get_internals()); });
12#ifdef PYBIND11_HAS_SUBINTERPRETER_SUPPORT
13 m.attr("defined_PYBIND11_HAS_SUBINTERPRETER_SUPPORT") = true;
14#else
15 m.attr("defined_PYBIND11_HAS_SUBINTERPRETER_SUPPORT") = false;
16#endif
17}

Callers

nothing calls this directly

Calls 1

attrMethod · 0.80

Tested by

no test coverage detected