Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use homogeneous dictionaries whenever possible.
[simgrid.git] / src / instr / instr_smpi.c
index 8cddd98..d4fab07 100644 (file)
@@ -82,7 +82,7 @@ static char *TRACE_smpi_put_key(int src, int dst, char *key, int n)
   xbt_dynar_t d = xbt_dict_get_or_null(keys, aux);
   if (d == NULL) {
     d = xbt_dynar_new(sizeof(char *), &xbt_free_ref);
-    xbt_dict_set(keys, aux, d, xbt_free);
+    xbt_dict_set(keys, aux, d, NULL);
   }
   //generate the key
   static unsigned long long counter = 0;
@@ -123,7 +123,7 @@ void TRACE_internal_smpi_set_category (const char *category)
   if (xbt_dict_get_or_null (process_category, processid))
     xbt_dict_remove (process_category, processid);
   if (category != NULL)
-    xbt_dict_set (process_category, processid, xbt_strdup(category), xbt_free);
+    xbt_dict_set (process_category, processid, xbt_strdup(category), NULL);
 }
 
 const char *TRACE_internal_smpi_get_category (void)
@@ -137,8 +137,8 @@ const char *TRACE_internal_smpi_get_category (void)
 
 void TRACE_smpi_alloc()
 {
-  keys = xbt_dict_new();
-  process_category = xbt_dict_new();
+  keys = xbt_dict_new_homogeneous(xbt_free);
+  process_category = xbt_dict_new_homogeneous(xbt_free);
 }
 
 void TRACE_smpi_start(void)