From: Arnaud Giersch Date: Thu, 19 Apr 2018 11:34:37 +0000 (+0200) Subject: Deprecate xbt_cfg_set_(). X-Git-Tag: v3.20~372 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/63c929772caa353d0bf4370b6e7bd29ad6d25899?ds=sidebyside Deprecate xbt_cfg_set_(). --- diff --git a/include/xbt/config.h b/include/xbt/config.h index e953b4757e..045292f61b 100644 --- a/include/xbt/config.h +++ b/include/xbt/config.h @@ -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") XBT_PUBLIC + void xbt_cfg_set_int(const char* name, int val); +XBT_ATTRIB_DEPRECATED_v323("Please use simgrid::config::set_value") XBT_PUBLIC + void xbt_cfg_set_double(const char* name, double val); +XBT_ATTRIB_DEPRECATED_v323("Please use simgrid::config::set_value") XBT_PUBLIC + void xbt_cfg_set_boolean(const char* name, const char* val); +XBT_ATTRIB_DEPRECATED_v323("Please use simgrid::config::set_value") 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); /* diff --git a/src/surf/sg_platf.cpp b/src/surf/sg_platf.cpp index 46081c435f..a6fcca8d06 100644 --- a/src/surf/sg_platf.cpp +++ b/src/surf/sg_platf.cpp @@ -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());