]> AND Public Git Repository - simgrid.git/blobdiff - src/instr/instr_paje_values.c
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
tiny conflict resolution
[simgrid.git] / src / instr / instr_paje_values.c
index 488468b204aed9b6ff92f8c97917c86b645f06fc..6773dd96489fd9b1cc1c679962bf15cd18d420c0 100644 (file)
@@ -30,6 +30,20 @@ val_t PJ_value_new (const char *name, const char *color, type_t father)
   return ret;
 }
 
+val_t PJ_value_get_or_new (const char *name, const char *color, type_t father)
+{
+  val_t ret = 0;
+  xbt_ex_t e;
+  TRY {
+    ret = PJ_value_get(name, father);
+  }
+  CATCH(e) {
+    xbt_ex_free(e);
+    ret = PJ_value_new(name, color, father);
+  }
+  return ret;
+}
+
 val_t PJ_value_get (const char *name, type_t father)
 {
   if (name == NULL || father == NULL){