Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix constness of arguments
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 6 Nov 2007 08:00:28 +0000 (08:00 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 6 Nov 2007 08:00:28 +0000 (08:00 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4971 48e7efb5-ca39-0410-a469-dd3cf9ba447f

include/gras/virtu.h
include/msg/msg.h
include/simdag/simdag.h
src/gras/Virtu/sg_process.c
src/msg/host.c
src/msg/m_process.c
src/simdag/sd_link.c
src/simdag/sd_workstation.c

index f67f5c6..962f1f1 100644 (file)
@@ -71,10 +71,10 @@ XBT_PUBLIC(int) gras_os_getpid(void);
 
 /* Properties related */
 XBT_PUBLIC(xbt_dict_t) gras_process_properties(void);
 
 /* Properties related */
 XBT_PUBLIC(xbt_dict_t) gras_process_properties(void);
-XBT_PUBLIC(const char*) gras_process_property_value(char* name);
+XBT_PUBLIC(const char*) gras_process_property_value(const char* name);
 
 XBT_PUBLIC(xbt_dict_t) gras_os_host_properties(void);
 
 XBT_PUBLIC(xbt_dict_t) gras_os_host_properties(void);
-XBT_PUBLIC(const char*) gras_os_host_property_value(char* name);   
+XBT_PUBLIC(const char*) gras_os_host_property_value(const char* name);   
 
 /** @} */
 SG_END_DECL()
 
 /** @} */
 SG_END_DECL()
index 744dcdd..197d78e 100644 (file)
@@ -41,7 +41,7 @@ XBT_PUBLIC(int) MSG_host_is_avail (m_host_t h);
 
 /*property handlers*/
 XBT_PUBLIC(xbt_dict_t) MSG_host_get_properties(m_host_t host);
 
 /*property handlers*/
 XBT_PUBLIC(xbt_dict_t) MSG_host_get_properties(m_host_t host);
-XBT_PUBLIC(const char*) MSG_host_get_property_value(m_host_t host, char* name);
+XBT_PUBLIC(const char*) MSG_host_get_property_value(m_host_t host, const char* name);
 
 XBT_PUBLIC(void) MSG_create_environment(const char *file);
 
 
 XBT_PUBLIC(void) MSG_create_environment(const char *file);
 
@@ -77,7 +77,7 @@ XBT_PUBLIC(m_process_t) MSG_process_self(void);
 
 /*property handlers*/
 XBT_PUBLIC(xbt_dict_t) MSG_process_get_properties(m_process_t process);
 
 /*property handlers*/
 XBT_PUBLIC(xbt_dict_t) MSG_process_get_properties(m_process_t process);
-XBT_PUBLIC(const char*) MSG_process_get_property_value(m_process_t process, char* name);
+XBT_PUBLIC(const char*) MSG_process_get_property_value(m_process_t process, const char* name);
 
 XBT_PUBLIC(MSG_error_t) MSG_process_suspend(m_process_t process);
 XBT_PUBLIC(MSG_error_t) MSG_process_resume(m_process_t process);
 
 XBT_PUBLIC(MSG_error_t) MSG_process_suspend(m_process_t process);
 XBT_PUBLIC(MSG_error_t) MSG_process_resume(m_process_t process);
index 8ca92a3..5723bab 100644 (file)
@@ -32,7 +32,7 @@ XBT_PUBLIC(double)             SD_link_get_current_bandwidth(SD_link_t link);
 XBT_PUBLIC(double)             SD_link_get_current_latency(SD_link_t link);
 /*property handling functions*/
 XBT_PUBLIC(xbt_dict_t) SD_link_get_properties(SD_link_t link);
 XBT_PUBLIC(double)             SD_link_get_current_latency(SD_link_t link);
 /*property handling functions*/
 XBT_PUBLIC(xbt_dict_t) SD_link_get_properties(SD_link_t link);
-XBT_PUBLIC(const char*) SD_link_get_property_value(SD_link_t link, char* name);
+XBT_PUBLIC(const char*) SD_link_get_property_value(SD_link_t link, const char* name);
 /** @} */
 
 /************************** Workstation handling ****************************/
 /** @} */
 
 /************************** Workstation handling ****************************/
@@ -59,7 +59,7 @@ XBT_PUBLIC(void*)                   SD_workstation_get_data(SD_workstation_t wor
 XBT_PUBLIC(const char*)             SD_workstation_get_name(SD_workstation_t workstation);
 /*property handling functions*/
 XBT_PUBLIC(xbt_dict_t) SD_workstation_get_properties(SD_workstation_t workstation);
 XBT_PUBLIC(const char*)             SD_workstation_get_name(SD_workstation_t workstation);
 /*property handling functions*/
 XBT_PUBLIC(xbt_dict_t) SD_workstation_get_properties(SD_workstation_t workstation);
-XBT_PUBLIC(const char*) SD_workstation_get_property_value(SD_workstation_t workstation, char* name);
+XBT_PUBLIC(const char*) SD_workstation_get_property_value(SD_workstation_t workstation, const char* name);
  
 XBT_PUBLIC(const SD_link_t*)              SD_route_get_list(SD_workstation_t src, SD_workstation_t dst);
 XBT_PUBLIC(int)                     SD_route_get_size(SD_workstation_t src, SD_workstation_t dst);
  
 XBT_PUBLIC(const SD_link_t*)              SD_route_get_list(SD_workstation_t src, SD_workstation_t dst);
 XBT_PUBLIC(int)                     SD_route_get_size(SD_workstation_t src, SD_workstation_t dst);
index e84f1ab..e1cac96 100644 (file)
@@ -138,7 +138,7 @@ gras_libdata_by_name_from_remote(const char *name, smx_process_t p) {
 }   
 
 /** @brief retrieve the value of a given process property (or NULL if not defined) */
 }   
 
 /** @brief retrieve the value of a given process property (or NULL if not defined) */
-const char* gras_process_property_value(char* name) {
+const char* gras_process_property_value(const char* name) {
  return xbt_dict_get_or_null(SIMIX_process_get_properties(SIMIX_process_self()), name);
 }
 
  return xbt_dict_get_or_null(SIMIX_process_get_properties(SIMIX_process_self()), name);
 }
 
@@ -177,7 +177,7 @@ int gras_os_getpid(void) {
 
 
 /** @brief retrieve the value of a given host property (or NULL if not defined) */
 
 
 /** @brief retrieve the value of a given host property (or NULL if not defined) */
-const char* gras_os_host_property_value(char* name) {
+const char* gras_os_host_property_value(const char* name) {
  return xbt_dict_get_or_null(SIMIX_host_get_properties(SIMIX_process_get_host(SIMIX_process_self())), name);
 }
 
  return xbt_dict_get_or_null(SIMIX_host_get_properties(SIMIX_process_get_host(SIMIX_process_self())), name);
 }
 
index 2b16677..12b0d5c 100644 (file)
@@ -193,7 +193,7 @@ double MSG_get_host_speed(m_host_t h)
  * \param name a property name
  * \return value of a property (or NULL if property not set)
  */
  * \param name a property name
  * \return value of a property (or NULL if property not set)
  */
-const char* MSG_host_get_property_value(m_host_t host, char* name)
+const char* MSG_host_get_property_value(m_host_t host, const char* name)
 {
   return xbt_dict_get_or_null(MSG_host_get_properties(host), name);
 }
 {
   return xbt_dict_get_or_null(MSG_host_get_properties(host), name);
 }
index 900f4cb..d36c64a 100644 (file)
@@ -327,7 +327,7 @@ const char *MSG_process_get_name(m_process_t process)
  * \param name a property name
  * \return value of a property (or NULL if the property is not set)
  */
  * \param name a property name
  * \return value of a property (or NULL if the property is not set)
  */
-const char* MSG_process_get_property_value(m_process_t process, char* name)
+const char* MSG_process_get_property_value(m_process_t process, const char* name)
 {
   return xbt_dict_get_or_null(MSG_process_get_properties(process), name);
 }
 {
   return xbt_dict_get_or_null(MSG_process_get_properties(process), name);
 }
index 4712b06..4e0baed 100644 (file)
@@ -124,7 +124,7 @@ double SD_link_get_current_bandwidth(SD_link_t link) {
  * \param name a property name
  * \return value of a property (or NULL if property not set)
  */
  * \param name a property name
  * \return value of a property (or NULL if property not set)
  */
-const char* SD_link_get_property_value(SD_link_t link, char* name)
+const char* SD_link_get_property_value(SD_link_t link, const char* name)
 {
   return xbt_dict_get_or_null(SD_link_get_properties(link), name);
 }
 {
   return xbt_dict_get_or_null(SD_link_get_properties(link), name);
 }
index fef8cf7..814c091 100644 (file)
@@ -136,7 +136,7 @@ const char* SD_workstation_get_name(SD_workstation_t workstation) {
  * \param name a property name
  * \return value of a property (or NULL if property not set)
  */
  * \param name a property name
  * \return value of a property (or NULL if property not set)
  */
-const char* SD_workstation_get_property_value(SD_workstation_t ws, char* name)
+const char* SD_workstation_get_property_value(SD_workstation_t ws, const char* name)
 {
   return xbt_dict_get_or_null(SD_workstation_get_properties(ws), name);
 }
 {
   return xbt_dict_get_or_null(SD_workstation_get_properties(ws), name);
 }