Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
[simgrid.git] / src / simdag / sd_link.c
index 98dd688..6ee5e6f 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2014. The SimGrid Team.
+/* Copyright (c) 2006-2015. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  */
 const SD_link_t *SD_link_get_list(void)
 {
+  if (sd_global->link_list == NULL)    /* this is the first time the function is called */
+    sd_global->link_list = sg_link_list();
 
-  xbt_lib_cursor_t cursor;
-  char *key;
-  void **data;
-  int i;
-
-  if (sd_global->link_list == NULL) {   /* this is the first time the function is called */
-    sd_global->link_list = xbt_new(SD_link_t, xbt_lib_length(link_lib));
-
-    i = 0;
-    xbt_lib_foreach(link_lib, cursor, key, data) {
-        sd_global->link_list[i++] = (SD_link_t) data[SD_LINK_LEVEL];
-    }
-  }
   return sd_global->link_list;
 }
 
-/**
- * \brief Returns the number of links
- *
- * \return the number of existing links
- * \see SD_link_get_list()
- */
-int SD_link_get_number(void)
-{
-  return xbt_lib_length(link_lib);
-}
-