- free_function(e->data);
-
- xbt_dynar_foreach(g->edges, cursor, edge)
- {
- if (edge == e)
- {
- if (g->directed) {
- idx = __xbt_find_in_dynar(edge->dst->in,edge);
- xbt_dynar_remove_at(edge->dst->in, idx,NULL);
- } else { /* only the out field is used */
- idx = __xbt_find_in_dynar(edge->dst->out,edge);
- xbt_dynar_remove_at(edge->dst->out, idx,NULL);
- }
-
- idx = __xbt_find_in_dynar(edge->src->out,edge);
- xbt_dynar_remove_at(edge->src->out,idx,NULL);
-
- xbt_dynar_cursor_rm(g->edges, &cursor);
- free(edge);
- break;
+ (*free_function) (e->data);
+
+ xbt_dynar_foreach(g->edges, cursor, edge) {
+ if (edge == e) {
+ if (g->directed) {
+ idx = __xbt_find_in_dynar(edge->dst->in, edge);
+ xbt_dynar_remove_at(edge->dst->in, idx, NULL);
+ } else { /* only the out field is used */
+ idx = __xbt_find_in_dynar(edge->dst->out, edge);
+ xbt_dynar_remove_at(edge->dst->out, idx, NULL);