Unverified Commit 91f97ca4 authored by Robert Haschke's avatar Robert Haschke Committed by GitHub
Browse files

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 7cf53ae8b4f99c0382845acf8bc63b64924dc891.
parent f5bc2040
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment