mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-24 22:25:10 +00:00
fix segfault in test suite due to typo (fixes #586)
This commit is contained in:
parent
aa586a9819
commit
636bddcfea
@ -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>();
|
||||||
|
Loading…
Reference in New Issue
Block a user