summaryrefslogtreecommitdiffstats
path: root/src/lib/Eina_Graph.h
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-01-03 22:05:27 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2014-01-03 22:05:27 +0100
commit2c3450a380342ed1f63314e2d0e732415902484f (patch)
tree7cc8778f6f2a71a5d4745b6fabace79810c83169 /src/lib/Eina_Graph.h
parent1cdad817aeac33568efebc5656908373330f7b34 (diff)
downloadeina_graph-2c3450a380342ed1f63314e2d0e732415902484f.zip
eina_graph-2c3450a380342ed1f63314e2d0e732415902484f.tar.gz
add macros CAST_V() and CAST_D() to support Eina_List(data)<->vertex number conversion
Diffstat (limited to 'src/lib/Eina_Graph.h')
-rw-r--r--src/lib/Eina_Graph.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/Eina_Graph.h b/src/lib/Eina_Graph.h
index 84e4abf..16a1282 100644
--- a/src/lib/Eina_Graph.h
+++ b/src/lib/Eina_Graph.h
@@ -60,4 +60,9 @@ eina_graph_shutdown(void);
#include <eina_graph.h>
#include <eina_graph_dfs.h>
+/**
+ * To cast Eina_List data into a vertex number.
+ */
+#define CAST_D(_d) ((unsigned int) (uintptr_t) _d)
+
#endif /* _EINA_GRAPH_MAIN_H */