Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
properties are now stored in maps and managed by ProperyHolder
[simgrid.git] / src / s4u / s4u_actor.cpp
index 6b6f2ef..7dcef8f 100644 (file)
@@ -174,14 +174,12 @@ void Actor::killAll(int resetPid)
 /** Retrieve the property value (or nullptr if not set) */
 const char* Actor::getProperty(const char* key)
 {
-  return (char*)xbt_dict_get_or_null(simcall_process_get_properties(pimpl_), key);
+  return simgrid::simix::kernelImmediate([this, key] { return pimpl_->getProperty(key); });
 }
 
 void Actor::setProperty(const char* key, const char* value)
 {
-  simgrid::simix::kernelImmediate([this, key, value] {
-    xbt_dict_set(simcall_process_get_properties(pimpl_), key, (char*)value, (void_f_pvoid_t) nullptr);
-  });
+  simgrid::simix::kernelImmediate([this, key, value] { pimpl_->setProperty(key, value); });
 }
 
 Actor* Actor::restart()