mirror of
https://github.com/pybind/pybind11.git
synced 2026-04-19 22:39:09 +00:00
type_caster_generic: add set_foreign_holder method for subclasses to implement (#5862)
* type_caster_generic: add set_foreign_holder method for subclasses to implement * style: pre-commit fixes * Rename try_shared_from_this -> set_via_shared_from_this to avoid confusion against try_get_shared_from_this * Add comment explaining the limits of the test * CI * style: pre-commit fixes * Fixes from code review * style: pre-commit fixes --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -26,7 +26,9 @@ PYBIND11_MODULE(pybind11_cross_module_tests, m, py::mod_gil_not_used()) {
|
||||
|
||||
// test_load_external
|
||||
bind_local<ExternalType1>(m, "ExternalType1", py::module_local());
|
||||
bind_local<ExternalType2>(m, "ExternalType2", py::module_local());
|
||||
bind_local<ExternalType2, 0, std::shared_ptr<ExternalType2>>(
|
||||
m, "ExternalType2", py::module_local());
|
||||
bind_local<ExternalType3, 0, py::smart_holder>(m, "ExternalType3", py::module_local());
|
||||
|
||||
// test_exceptions.py
|
||||
py::register_local_exception<LocalSimpleException>(m, "LocalSimpleException");
|
||||
|
||||
Reference in New Issue
Block a user