Commit cd7eacc5 by Wenzel Jakob

fix segfault in test suite due to typo (fixes #586)

parent 0e49c022
...@@ -71,7 +71,7 @@ test_initializer pickling([](py::module &m) { ...@@ -71,7 +71,7 @@ test_initializer pickling([](py::module &m) {
throw std::runtime_error("Invalid state!"); throw std::runtime_error("Invalid state!");
/* Cast and construct */ /* Cast and construct */
auto& p = self.cast<PickleableWithDict&>(); auto& p = self.cast<PickleableWithDict&>();
new (&p) Pickleable(t[0].cast<std::string>()); new (&p) PickleableWithDict(t[0].cast<std::string>());
/* Assign C++ state */ /* Assign C++ state */
p.extra = t[1].cast<int>(); p.extra = t[1].cast<int>();
......
Markdown is supported
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