src/tree.c

changeset 903
a018f5916d3b
parent 902
5ed7f634f046
child 904
cdc49211d87f
equal deleted inserted replaced
902:5ed7f634f046 903:a018f5916d3b
773 while (cxIteratorValid(visitor)) { 773 while (cxIteratorValid(visitor)) {
774 cxIteratorNext(visitor); 774 cxIteratorNext(visitor);
775 } 775 }
776 return visitor.counter; 776 return visitor.counter;
777 } 777 }
778
779 size_t cxTreeSubtreeDepth(CxTree *tree, void *subtree_root) {
780 CxTreeVisitor visitor = cx_tree_visitor(
781 subtree_root,
782 tree->loc_children,
783 tree->loc_next
784 );
785 while (cxIteratorValid(visitor)) {
786 cxIteratorNext(visitor);
787 }
788 return visitor.depth;
789 }

mercurial