Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use typed Mailbox::get<>() instead of using static_cast everywhere.
[simgrid.git] / src / bindings / python / simgrid_python.cpp
index fc492d5..ce60453 100644 (file)
@@ -251,7 +251,7 @@ PYBIND11_MODULE(simgrid, m)
       .def(
           "get",
           [](Mailbox* self) {
-            py::object data = pybind11::reinterpret_steal<py::object>(static_cast<PyObject*>(self->get()));
+            py::object data = pybind11::reinterpret_steal<py::object>(self->get<PyObject>());
             // data.dec_ref(); // FIXME: why does it break python-actor-create?
             return data;
           },