X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/1f0790965ada172e7ac96eb848759e02f7fbc8ca..b9684d3607aa558c95b7185ddf147b478a7e367f:/src/surf/sg_platf.cpp?ds=sidebyside diff --git a/src/surf/sg_platf.cpp b/src/surf/sg_platf.cpp index 036b9ca4a7..7b85965e5d 100644 --- a/src/surf/sg_platf.cpp +++ b/src/surf/sg_platf.cpp @@ -570,14 +570,14 @@ void sg_platf_new_process(sg_platf_process_cbarg_t process) msg->data[msg->used-3]='\0'; xbt_die("%s", msg->data); } - xbt_main_func_t parse_code = SIMIX_get_registered_function(process->function); - xbt_assert(parse_code, "Function '%s' unknown", process->function); + simgrid::simix::ActorCodeFactory& factory = SIMIX_get_actor_code_factory(process->function); + xbt_assert(factory, "Function '%s' unknown", process->function); double start_time = process->start_time; double kill_time = process->kill_time; int auto_restart = process->on_failure == SURF_PROCESS_ON_FAILURE_DIE ? 0 : 1; - std::function code = simgrid::xbt::wrapMain(parse_code, process->argc, process->argv); + std::function code = factory(simgrid::xbt::args(process->argc, process->argv)); smx_process_arg_t arg = nullptr; smx_process_t process_created = nullptr;