diff options
| author | Stefan Monnier | 2022-10-02 12:21:13 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2022-10-02 12:21:13 -0400 |
| commit | b8fbd42f0a7caa4cd9e2d50dd4e4b2101ac78acd (patch) | |
| tree | 25be12b466304f493f3f49857f8b26a7d85f2f7a /src/itree.h | |
| parent | ba5fe8e7895a2cbfd2d666ca88c0ed96a73fbe29 (diff) | |
| download | emacs-b8fbd42f0a7caa4cd9e2d50dd4e4b2101ac78acd.tar.gz emacs-b8fbd42f0a7caa4cd9e2d50dd4e4b2101ac78acd.zip | |
mark_overlays: Use the normal ITREE_FOREACH
This commit basically reverts commit 5b954f8f9. The problem of nested
iterations hasn't been fixed in the mean time, but since the GC can
run arbitrary ELisp code (via `post-gc-hook`), running the GC from
within an itree iteration is already unsafe anyway :-(
* src/alloc.c (mark_overlays): Delete function.
(mark_buffer): Use ITREE_FOREACH.
Diffstat (limited to 'src/itree.h')
| -rw-r--r-- | src/itree.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/itree.h b/src/itree.h index 1f019a2607e..29bc8dd1b25 100644 --- a/src/itree.h +++ b/src/itree.h | |||
| @@ -105,7 +105,8 @@ void interval_tree_delete_gap (struct interval_tree *, ptrdiff_t, ptrdiff_t); | |||
| 105 | - The expression T may be evaluated more than once, so make sure | 105 | - The expression T may be evaluated more than once, so make sure |
| 106 | it is cheap a pure. | 106 | it is cheap a pure. |
| 107 | - Only a single iteration can happen at a time, so make sure none of the | 107 | - Only a single iteration can happen at a time, so make sure none of the |
| 108 | code within the loop can start another tree_itertion. | 108 | code within the loop can start another tree iteration, i.e. it shouldn't |
| 109 | be able to run ELisp code (or GC for that matter). | ||
| 109 | - If you need to exit the loop early, you *have* to call `ITREE_ABORT` | 110 | - If you need to exit the loop early, you *have* to call `ITREE_ABORT` |
| 110 | just before exiting (e.g. with `break` or `return`). | 111 | just before exiting (e.g. with `break` or `return`). |
| 111 | - Non-local exits are not supported within the body of the loop, | 112 | - Non-local exits are not supported within the body of the loop, |