diff --git a/rdic.h b/rdic.h index de8ef09..cb0817f 100644 --- a/rdic.h +++ b/rdic.h @@ -47,6 +47,12 @@ static inline int rdic_node_references_equal( return (n.node == m.node) && (n.generation == m.generation); } +static inline int rdic_node_reference_valid( + RDIC_Node_Reference n) +{ + return (n.node != NULL) && (n.generation == n.node->generation); +} + enum { RDIC_GET_NODE__NODES_COLLECTED = 1 << 0, RDIC_GET_NODE__NODE_ALLOCATED = 1 << 1,