pybind11/include
Robert Haschke 91f97ca401
smart_holder fixups (#3012)
* Drop constraints on casting of std::shared_ptr

std::shared_ptrs can be shared across python and C++ by design.

* Correctly report casting error

It is important to return an empty handle.
Simply returning None, would skip the error handling in
simple_collector / unpacking_collector, although a python exception is set.
A function call would then be processed with a (wrong) None argument!

* Return None for nullptr

* Revert "Drop constraints on casting of std::shared_ptr"

This reverts commit 7cf53ae8b4.
2021-05-28 06:35:50 -07:00
..
pybind11 smart_holder fixups (#3012) 2021-05-28 06:35:50 -07:00