Unverified Commit 6cf6bf20 authored by Yannick Jadoul's avatar Yannick Jadoul Committed by GitHub
Browse files

Fix confusing weakref constructor overload (#2832)

* Demonstrate issue with weakref constructor overloads

* Fix weakref constructor to convert on being passed a non-weakref object

* Improve on nonlocal-scoped variable in test_weakref

* Keep backwards-compatibility by introducing PYBIND11_OBJECT_CVT_DEFAULT macro

* Simplify test_weakref
parent 932769b0
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