src/cx/tree.h

changeset 903
a018f5916d3b
parent 902
5ed7f634f046
child 904
cdc49211d87f
--- a/src/cx/tree.h	Thu Oct 03 15:38:05 2024 +0200
+++ b/src/cx/tree.h	Thu Oct 03 15:42:35 2024 +0200
@@ -1091,6 +1091,16 @@
 size_t cxTreeSubtreeSize(CxTree *tree, void *subtree_root);
 
 /**
+ * Determines the depth of the specified subtree.
+ *
+ * @param tree the tree
+ * @param subtree_root the root node of the subtree
+ * @return the tree depth including the \p subtree_root
+ */
+__attribute__((__nonnull__))
+size_t cxTreeSubtreeDepth(CxTree *tree, void *subtree_root);
+
+/**
  * Creates a depth-first iterator for the specified tree.
  *
  * @param tree the tree to iterate

mercurial