+ if (sd_global->link_list == NULL) { /* this is the first time the function is called */
+ sd_global->link_list = xbt_new(SD_link_t, sd_global->link_count);
+
+ i = 0;
+ xbt_dict_foreach(sd_global->links, cursor, key, data) {
+ sd_global->link_list[i++] = (SD_link_t) data;
+ }
+ }
+ return sd_global->link_list;
+}
+
+/**
+ * \brief Returns the number of links
+ *
+ * \return the number of existing links
+ * \see SD_link_get_list()