]> git.eshelyaron.com Git - emacs.git/commit
itree.c: Clarify how the sentinel is used
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 5 Oct 2022 16:12:01 +0000 (12:12 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 5 Oct 2022 16:12:01 +0000 (12:12 -0400)
commitaa5a32ca2c07691f3f10b7ec0c423ade11479220
tree2852c532076b86fb544e07ad0dedf5fe834246c6
parent4f4327c0b0db7f908ae7153e5ddc802b9808dc2e
itree.c: Clarify how the sentinel is used

* src/itree.c (null_is_sane): New function.
(interval_tree_iter_start): Use it to make sure we haven't garbled null.
(itree_init): Fully initialize `itree_null` here...
(interval_tree_clear): ...instead of here.
(interval_tree_propagate_limit): Remove special code that read NULL->parent.
(interval_tree_remove): Do it explicitly before the call in those two
places where it can happen.
src/itree.c