egaebel / adjacencylist--c Goto Github PK
View Code? Open in Web Editor NEWA generic C implementation of an AdjacencyList. Uses a pre-processor macro to enable the generic-ness. To use this AdjacencyList you must embed an AdjNode struct into your data objects, and then use the macro ADJ_LIST_ENTRY(DATA_OBJECT, STRUCT_TYPE (of your DATA_OBJECT), MEMBER (the variable name in DATA_OBJECT of the AdjNode stored in it))