diff options
author | Aaron Gokaslan <aaronGokaslan@gmail.com> | 2023-07-12 16:20:08 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-12 13:20:08 -0700 |
commit | b33d06f61543878a81a433ed2d472b61d3fca0ca (patch) | |
tree | c8a82d3f283bce2314c1ae8205242ea8801bd8fe | |
parent | 2e5f5c4cf8efdd62acbeb4632e8988b2148f6caf (diff) | |
download | pybind11-b33d06f61543878a81a433ed2d472b61d3fca0ca.tar.gz |
bugfix: fixes a test suite bug in the __new__ example (#4698)
* bugfix: fixes a test suite bug in the __new__ example
* See https://github.com/pybind/pybind11/pull/4698#discussion_r1227107682
---------
Co-authored-by: Ralf W. Grosse-Kunstleve <rwgk@google.com>
-rw-r--r-- | tests/test_class.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_class.cpp b/tests/test_class.cpp index ca925917..7241bc88 100644 --- a/tests/test_class.cpp +++ b/tests/test_class.cpp @@ -85,7 +85,7 @@ TEST_SUBMODULE(class_, m) { .def_static("new_instance", &NoConstructor::new_instance, "Return an instance"); py::class_<NoConstructorNew>(m, "NoConstructorNew") - .def(py::init([](const NoConstructorNew &self) { return self; })) // Need a NOOP __init__ + .def(py::init([]() { return nullptr; })) // Need a NOOP __init__ .def_static("__new__", [](const py::object &) { return NoConstructorNew::new_instance(); }); |