]> git.eshelyaron.com Git - emacs.git/commit
Improve check_subtree
authorMatt Armstrong <matt@rfc20.org>
Mon, 10 Oct 2022 15:48:41 +0000 (08:48 -0700)
committerMatt Armstrong <matt@rfc20.org>
Tue, 11 Oct 2022 02:37:51 +0000 (19:37 -0700)
commit67b9e89a5aa0052b1abdcd8971a0fa83f52e13a5
tree689c6c3aaf8d24cad9aaf470765010e08d6e53a8
parent246acbddbeb3e9a390fe78242259182af0c2cc18
Improve check_subtree

* src/itree.c (struct check_subtree_result): new struct returned by
check_subtree.
(check_subtree): new function, renamed from recurse_check_tree.  Add
new black height assertions.
(check_tree): assert that the tree has non-negative size, assert that
limiting to interval_tree_max_height(tree) levels is enough to
traverses the complete tree.
src/itree.c