|
1 | 1 | #include <pybind11/critical_section.h> |
2 | 2 | #include <pybind11/embed.h> |
| 3 | +#include <pybind11/pybind11.h> |
3 | 4 |
|
4 | 5 | // Silence MSVC C++17 deprecation warning from Catch regarding std::uncaught_exceptions (up to |
5 | 6 | // catch 2.0.1; this should be fixed in the next catch release after 2.0.1). |
@@ -76,17 +77,19 @@ PYBIND11_EMBEDDED_MODULE(widget_module, m, py::multiple_interpreters::per_interp |
76 | 77 | sub.def("add", [](int i, int j) { return i + j; }); |
77 | 78 | } |
78 | 79 |
|
79 | | -PYBIND11_EMBEDDED_MODULE(trampoline_module, m) { |
| 80 | +PYBIND11_EMBEDDED_MODULE(trampoline_module, m, py::multiple_interpreters::not_supported()) { |
80 | 81 | py::class_<test_override_cache_helper, |
81 | 82 | test_override_cache_helper_trampoline, |
82 | 83 | std::shared_ptr<test_override_cache_helper>>(m, "test_override_cache_helper") |
83 | 84 | .def(py::init_alias<>()) |
84 | 85 | .def("func", &test_override_cache_helper::func); |
85 | 86 | } |
86 | 87 |
|
87 | | -PYBIND11_EMBEDDED_MODULE(throw_exception, ) { throw std::runtime_error("C++ Error"); } |
| 88 | +PYBIND11_EMBEDDED_MODULE(throw_exception, , py::multiple_interpreters::not_supported()) { |
| 89 | + throw std::runtime_error("C++ Error"); |
| 90 | +} |
88 | 91 |
|
89 | | -PYBIND11_EMBEDDED_MODULE(throw_error_already_set, ) { |
| 92 | +PYBIND11_EMBEDDED_MODULE(throw_error_already_set, , py::multiple_interpreters::not_supported()) { |
90 | 93 | auto d = py::dict(); |
91 | 94 | d["missing"].cast<py::object>(); |
92 | 95 | } |
|
0 commit comments