]> AND Public Git Repository - simgrid.git/blobdiff - src/bindings/python/simgrid_python.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' into depencencies
[simgrid.git] / src / bindings / python / simgrid_python.cpp
index 279f72e85260a28e3170c2f5098232499e4adb83..a392042e7d137a69e63cde60e311e25ebfab7b34 100644 (file)
@@ -259,7 +259,7 @@ PYBIND11_MODULE(simgrid, m)
       .def("get",
            [](Mailbox* self) {
              py::object data = pybind11::reinterpret_steal<py::object>(static_cast<PyObject*>(self->get()));
-             data.dec_ref();
+             // data.dec_ref(); // FIXME: why does it break python-actor-create?
              return data;
            },
            py::call_guard<GilScopedRelease>(),
@@ -321,6 +321,8 @@ PYBIND11_MODULE(simgrid, m)
                                             "application, see :ref:`class s4u::Actor <API_s4u_Actor>`")
       .def("create",
            [](py::str name, Host* host, py::object fun, py::args args) {
+             fun.inc_ref();  // FIXME: why is this needed for tests like exec-async, exec-dvfs and exec-remote?
+             args.inc_ref(); // FIXME: why is this needed for tests like actor-migrate?
              return simgrid::s4u::Actor::create(name, host, [fun, args]() {
                GilScopedAcquire py_context;
                try {