summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp/bytecomp-resources/warn-variable-let-bind-constant.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2022-10-02 12:27:37 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2022-10-02 12:27:37 -0400
commit2c4a3910b384a1f5b14d282818b04e25785e25b0 (patch)
tree751f2057dba9d2dfb42ef5b8902a7e99054c8d71 /test/lisp/emacs-lisp/bytecomp-resources/warn-variable-let-bind-constant.el
parentb8fbd42f0a7caa4cd9e2d50dd4e4b2101ac78acd (diff)
downloademacs-2c4a3910b384a1f5b14d282818b04e25785e25b0.tar.gz
emacs-2c4a3910b384a1f5b14d282818b04e25785e25b0.tar.bz2
emacs-2c4a3910b384a1f5b14d282818b04e25785e25b0.zip
itree: Use a single iterator object
Instead of having one iterator object per buffer, use just a single global one. There is virtually no benefit to having per-buffer iterators anyway: if two iterations can be active at the same time, then there can be cases where those two iterations happen to operate on the same buffer :-( * src/itree.h (struct interval_tree): Remove `iter` field. * src/itree.c (interval_generator_destroy) (interval_tree_iter_ensure_space): Delete functions. (iter): New global variable. (init_itree_null): Rename to `itree_init` and adjust all callers. Initialize `iter` as well. (interval_tree_create, interval_tree_init): Don't initialize `iter` field any more. (interval_tree_destroy): Don't destroy `iter` field any more. (interval_tree_insert): Don't bother growing the iterator (it's grown in `interval_stack_push_flagged` if needed anyway, and in any case there's no `iter` here to grow any more). (interval_tree_remove): Tweak assertion to be more precise and self-evident. (interval_tree_iter_start): Use the global `iter`. (interval_generator_create): Make it work with a NULL argument.
Diffstat (limited to 'test/lisp/emacs-lisp/bytecomp-resources/warn-variable-let-bind-constant.el')
0 files changed, 0 insertions, 0 deletions