Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Deprecate xbt_cfg_set_<type>().
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 19 Apr 2018 11:34:37 +0000 (13:34 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 19 Apr 2018 14:06:43 +0000 (16:06 +0200)
include/xbt/config.h
src/surf/sg_platf.cpp

index e953b47..045292f 100644 (file)
@@ -70,10 +70,14 @@ SG_BEGIN_DECL()
 XBT_PUBLIC void xbt_cfg_set_parse(const char* options);
 
 /* Set the value of the cell \a name in \a cfg with the provided value.*/
-XBT_PUBLIC void xbt_cfg_set_int(const char* name, int val);
-XBT_PUBLIC void xbt_cfg_set_double(const char* name, double val);
-XBT_PUBLIC void xbt_cfg_set_boolean(const char* name, const char* val);
-XBT_PUBLIC void xbt_cfg_set_string(const char* name, const char* val);
+XBT_ATTRIB_DEPRECATED_v323("Please use simgrid::config::set_value<int>") XBT_PUBLIC
+    void xbt_cfg_set_int(const char* name, int val);
+XBT_ATTRIB_DEPRECATED_v323("Please use simgrid::config::set_value<double>") XBT_PUBLIC
+    void xbt_cfg_set_double(const char* name, double val);
+XBT_ATTRIB_DEPRECATED_v323("Please use simgrid::config::set_value<bool>") XBT_PUBLIC
+    void xbt_cfg_set_boolean(const char* name, const char* val);
+XBT_ATTRIB_DEPRECATED_v323("Please use simgrid::config::set_value<std::string>") XBT_PUBLIC
+    void xbt_cfg_set_string(const char* name, const char* val);
 XBT_PUBLIC void xbt_cfg_set_as_string(const char* name, const char* val);
 
 /*
index 46081c4..a6fcca8 100644 (file)
@@ -509,7 +509,7 @@ static void surf_config_models_setup()
   if ((not xbt_cfg_is_default_value("network/model") || not xbt_cfg_is_default_value("cpu/model")) &&
       xbt_cfg_is_default_value("host/model")) {
     host_model_name = "compound";
-    xbt_cfg_set_string("host/model", host_model_name.c_str());
+    simgrid::config::set_value("host/model", host_model_name);
   }
 
   XBT_DEBUG("host model: %s", host_model_name.c_str());