]> git.eshelyaron.com Git - emacs.git/commit
itree.[ch]: Add sanity checks, comments, and minor tweaks
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 28 Sep 2022 23:05:16 +0000 (19:05 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 28 Sep 2022 23:05:16 +0000 (19:05 -0400)
commitea8daec9bb8ebf3cbca35edec4e4ef7b6edac3de
tree1a34f44adca5fbf08033829dab643db6340bf296
parent800ecd4767df48beeefabccdacd089b8c4286529
itree.[ch]: Add sanity checks, comments, and minor tweaks

* src/alloc.c (mark_overlay): Add sanity check.

* src/buffer.c (next_overlay_change, previous_overlay_change):
Tweak code to keep the same vars for the bounds.

* src/itree.c (interval_tree_clear, interval_tree_insert)
(interval_tree_remove, interval_tree_insert_fix, interval_tree_remove_fix):
Adjust to the `color` -> `red` change.
(interval_tree_clear): Prefer `true/false` for booleans.
(interval_generator_create): Use an actual `interval_tree_order` value
rather than 0.
(interval_generator_next): Simplify a tiny bit.  Add comment.
(interval_generator_narrow): Add sanity check.

* src/itree.h (struct interval_node): Replace `color` field with
boolean `red` field.
(enum interval_tree_order): Remove unused `ITREE_DEFLT_ORDER` value.

* src/pdumper.c (dump_interval_node): Adjust to the
`color` -> `red` change.
src/alloc.c
src/buffer.c
src/itree.c
src/itree.h
src/pdumper.c