summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/graph.h
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2017-04-15 20:11:43 +0200
committerAndrew Gregory <andrew.gregory.8@gmail.com>2017-04-16 14:26:13 +0200
commit9c763a0d1ba8aa56b1ff54cd8d137c6b73e19f11 (patch)
treeb0517e981cbca5b31247dec71fca5175afeb722b /lib/libalpm/graph.h
parent13ec13c85e4ea39e51d58b0842d8bef50e2ae369 (diff)
downloadpacman-9c763a0d1ba8aa56b1ff54cd8d137c6b73e19f11.tar.gz
pacman-9c763a0d1ba8aa56b1ff54cd8d137c6b73e19f11.tar.xz
graph.h: replace hardcoded values with an enum
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Diffstat (limited to 'lib/libalpm/graph.h')
-rw-r--r--lib/libalpm/graph.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/libalpm/graph.h b/lib/libalpm/graph.h
index 2e9eac10..233862b9 100644
--- a/lib/libalpm/graph.h
+++ b/lib/libalpm/graph.h
@@ -23,13 +23,19 @@
#include "alpm_list.h"
+enum __alpm_graph_vertex_state {
+ ALPM_GRAPH_STATE_UNPROCESSED,
+ ALPM_GRAPH_STATE_PROCESSING,
+ ALPM_GRAPH_STATE_PROCESSED
+};
+
typedef struct __alpm_graph_t {
void *data;
struct __alpm_graph_t *parent; /* where did we come from? */
alpm_list_t *children;
alpm_list_t *childptr; /* points to a child in children list */
off_t weight; /* weight of the node */
- signed char state; /* 0: untouched, -1: entered, other: leaving time */
+ enum __alpm_graph_vertex_state state;
} alpm_graph_t;
alpm_graph_t *_alpm_graph_new(void);