summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp/float-sup-tests.el
diff options
context:
space:
mode:
authorMatt Armstrong <matt@rfc20.org>2022-10-10 10:45:05 -0700
committerMatt Armstrong <matt@rfc20.org>2022-10-10 19:37:51 -0700
commitda0387f0fe79f577fae6d5453c758f600e1ae495 (patch)
tree12aad28099e8718644f7d831202df266306f92fd /test/lisp/emacs-lisp/float-sup-tests.el
parenta154259bfacf7f1406794a952e80a8197b9a83fb (diff)
downloademacs-da0387f0fe79f577fae6d5453c758f600e1ae495.tar.gz
emacs-da0387f0fe79f577fae6d5453c758f600e1ae495.tar.bz2
emacs-da0387f0fe79f577fae6d5453c758f600e1ae495.zip
Stop reading and writing the itree_null.parent field entirely.
With this change all fields in the itree_null sentinel are read only. This makes accessing itree_null thread safe in an obvious way. Because it took two commits from two peole to get this right, I think we can call this design fragile and difficult to reason about. Another benefit of this commit is as preparation for removing sentinel node completely, and just using NULL. * src/itree.c (itree_null): Statically initialize itree_null.parent to NULL. It is never accessed. (null_is_sane): Assert parent == NULL. (interval_tree_remove_fix): Remove unecessary assignments to parent from node->parent. These were the last places itree_null.parent were read. (interval_tree_remove): Avoid an assignment to itree_null.parent through min->right->parent. (interval_tree_transplant): Avoid an assignment to itree_null.parent through source->parent.
Diffstat (limited to 'test/lisp/emacs-lisp/float-sup-tests.el')
0 files changed, 0 insertions, 0 deletions