diff options
| author | Gerd Möllmann | 2024-06-11 11:26:18 +0200 |
|---|---|---|
| committer | Gerd Möllmann | 2024-06-14 10:15:28 +0200 |
| commit | bb59e7a544c4eb8749c6e46989ceffafc296c7e6 (patch) | |
| tree | 9b4484b247a4356c3e9769edc1d7a8ccdc90c299 /src/alloc.c | |
| parent | cd066bcdfa976db3a383296dc0f3cfaa2994f105 (diff) | |
| download | emacs-bb59e7a544c4eb8749c6e46989ceffafc296c7e6.tar.gz emacs-bb59e7a544c4eb8749c6e46989ceffafc296c7e6.zip | |
Use weak vector for buffer markers
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/alloc.c b/src/alloc.c index c168dc493da..c27c7b0a88d 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -4155,7 +4155,9 @@ DEFUN ("make-marker", Fmake_marker, Smake_marker, 0, 0, 0, | |||
| 4155 | p->buffer = 0; | 4155 | p->buffer = 0; |
| 4156 | p->bytepos = 0; | 4156 | p->bytepos = 0; |
| 4157 | p->charpos = 0; | 4157 | p->charpos = 0; |
| 4158 | #ifndef HAVE_MPS | ||
| 4158 | p->next = NULL; | 4159 | p->next = NULL; |
| 4160 | #endif | ||
| 4159 | p->insertion_type = 0; | 4161 | p->insertion_type = 0; |
| 4160 | p->need_adjustment = 0; | 4162 | p->need_adjustment = 0; |
| 4161 | return make_lisp_ptr (p, Lisp_Vectorlike); | 4163 | return make_lisp_ptr (p, Lisp_Vectorlike); |
| @@ -4180,8 +4182,12 @@ build_marker (struct buffer *buf, ptrdiff_t charpos, ptrdiff_t bytepos) | |||
| 4180 | m->bytepos = bytepos; | 4182 | m->bytepos = bytepos; |
| 4181 | m->insertion_type = 0; | 4183 | m->insertion_type = 0; |
| 4182 | m->need_adjustment = 0; | 4184 | m->need_adjustment = 0; |
| 4185 | #ifdef HAVE_MPS | ||
| 4186 | igc_add_marker (buf, m); | ||
| 4187 | #else | ||
| 4183 | m->next = BUF_MARKERS (buf); | 4188 | m->next = BUF_MARKERS (buf); |
| 4184 | BUF_MARKERS (buf) = m; | 4189 | BUF_MARKERS (buf) = m; |
| 4190 | #endif | ||
| 4185 | return make_lisp_ptr (m, Lisp_Vectorlike); | 4191 | return make_lisp_ptr (m, Lisp_Vectorlike); |
| 4186 | } | 4192 | } |
| 4187 | 4193 | ||