Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use C++ string for argument.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 4 Jan 2023 15:20:31 +0000 (16:20 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 5 Jan 2023 15:44:31 +0000 (16:44 +0100)
src/bindings/python/simgrid_python.cpp

index 82b035c..7ba51a0 100644 (file)
@@ -855,7 +855,7 @@ PYBIND11_MODULE(simgrid, m)
                                             "application. See the C++ documentation for details.")
       .def(
           "create",
-          [](py::str name, Host* h, py::object fun, py::args args) {
+          [](const std::string& name, Host* h, 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, h, [fun, args]() {