A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid into LLL
[simgrid.git]
/
src
/
xbt
/
graph.c
diff --git
a/src/xbt/graph.c
b/src/xbt/graph.c
index
3d7cfca
..
e56e413
100644
(file)
--- a/
src/xbt/graph.c
+++ b/
src/xbt/graph.c
@@
-144,12
+144,12
@@
void xbt_graph_free_graph(xbt_graph_t g,
xbt_dynar_free(&(node->out));
xbt_dynar_free(&(node->in));
if (node_free_function)
xbt_dynar_free(&(node->out));
xbt_dynar_free(&(node->in));
if (node_free_function)
-
(*node_free_function)
(node->data);
+
node_free_function
(node->data);
}
xbt_dynar_foreach(g->edges, cursor, edge) {
if (edge_free_function)
}
xbt_dynar_foreach(g->edges, cursor, edge) {
if (edge_free_function)
-
(*edge_free_function)
(edge->data);
+
edge_free_function
(edge->data);
}
xbt_dynar_foreach(g->nodes, cursor, node)
}
xbt_dynar_foreach(g->nodes, cursor, node)
@@
-160,7
+160,7
@@
void xbt_graph_free_graph(xbt_graph_t g,
free(edge);
xbt_dynar_free(&(g->edges));
if (graph_free_function)
free(edge);
xbt_dynar_free(&(g->edges));
if (graph_free_function)
-
(*graph_free_function)
(g->data);
+
graph_free_function
(g->data);
free(g);
xbt_graph_parse_lex_destroy();
return;
free(g);
xbt_graph_parse_lex_destroy();
return;
@@
-190,7
+190,7
@@
void xbt_graph_free_node(xbt_graph_t g, xbt_node_t n,
}
if ((node_free_function) && (n->data))
}
if ((node_free_function) && (n->data))
-
(*node_free_function)
(n->data);
+
node_free_function
(n->data);
cursor = 0;
xbt_dynar_foreach(g->nodes, cursor, node)
cursor = 0;
xbt_dynar_foreach(g->nodes, cursor, node)
@@
-214,7
+214,7
@@
void xbt_graph_free_edge(xbt_graph_t g, xbt_edge_t e,
xbt_edge_t edge = NULL;
if ((free_function) && (e->data))
xbt_edge_t edge = NULL;
if ((free_function) && (e->data))
-
(*free_function)
(e->data);
+
free_function
(e->data);
xbt_dynar_foreach(g->edges, cursor, edge) {
if (edge == e) {
xbt_dynar_foreach(g->edges, cursor, edge) {
if (edge == e) {
@@
-561,7
+561,7
@@
static void __parse_graph_begin(void)
else
parsed_graph = xbt_graph_new_graph(0, NULL);
else
parsed_graph = xbt_graph_new_graph(0, NULL);
- parsed_nodes = xbt_dict_new
(
);
+ parsed_nodes = xbt_dict_new
_homogeneous(NULL
);
}
static void __parse_graph_end(void)
}
static void __parse_graph_end(void)
@@
-627,8
+627,8
@@
xbt_graph_t xbt_graph_read(const char *filename,
ETag_graphxml_edge_fun = __parse_edge;
xbt_graph_parse_open(filename);
ETag_graphxml_edge_fun = __parse_edge;
xbt_graph_parse_open(filename);
- int res;
- res =
(*xbt_graph_parse)
();
+
_XBT_GNUC_UNUSED
int res;
+ res =
xbt_graph_parse
();
xbt_assert(!res, "Parse error in %s", filename);
xbt_graph_parse_close();
xbt_assert(!res, "Parse error in %s", filename);
xbt_graph_parse_close();
@@
-735,7
+735,7
@@
xbt_graph_t xbt_graph_load (const char *filename)
file = fopen (filename, "r");
xbt_assert(file, "Failed to open %s \n", filename);
file = fopen (filename, "r");
xbt_assert(file, "Failed to open %s \n", filename);
- xbt_dict_t nodes_dict = xbt_dict_new
(
);
+ xbt_dict_t nodes_dict = xbt_dict_new
_homogeneous(NULL
);
xbt_graph_t ret = xbt_graph_new_graph (0, NULL);
//read the number of nodes
xbt_graph_t ret = xbt_graph_new_graph (0, NULL);
//read the number of nodes