| 68 | }; |
| 69 | |
| 70 | PYBIND11_EMBEDDED_MODULE(widget_module, m, py::multiple_interpreters::per_interpreter_gil()) { |
| 71 | py::class_<Widget, PyWidget>(m, "Widget") |
| 72 | .def(py::init<std::string>()) |
| 73 | .def_property_readonly("the_message", &Widget::the_message); |
| 74 | |
| 75 | m.def("add", [](int i, int j) { return i + j; }); |
| 76 | |
| 77 | auto sub = m.def_submodule("sub"); |
| 78 | sub.def("add", [](int i, int j) { return i + j; }); |
| 79 | } |
| 80 | |
| 81 | PYBIND11_EMBEDDED_MODULE(trampoline_module, m) { |
| 82 | py::class_<test_override_cache_helper, |
no test coverage detected