commit | 00b8f3655dafe32ae04e05212a5a2aa1e2a0d16a | [log] [tgz] |
---|---|---|
author | Dean Moldovan <dean0x7d@gmail.com> | Mon Sep 04 23:46:11 2017 +0200 |
committer | Dean Moldovan <dean0x7d@gmail.com> | Wed Sep 06 15:20:52 2017 +0200 |
tree | c9a59302f38e435bcc9bcaf55c36b54420e8d6dc | |
parent | 7939f4b3fe421f1457841225c048330878979f6f [diff] [blame] |
Relax py::pickle() get/set type check Fixes #1061. `T` and `const T &` are compatible types.
diff --git a/tests/test_pickling.cpp b/tests/test_pickling.cpp index 821462a..9dc63bd 100644 --- a/tests/test_pickling.cpp +++ b/tests/test_pickling.cpp
@@ -115,7 +115,7 @@ [](py::object self) { return py::make_tuple(self.attr("value"), self.attr("extra"), self.attr("__dict__")); }, - [](py::tuple t) { + [](const py::tuple &t) { if (t.size() != 3) throw std::runtime_error("Invalid state!");