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 } |