diff options
| author | Paul Eggert | 2020-08-30 23:40:11 -0700 |
|---|---|---|
| committer | Paul Eggert | 2020-08-31 00:05:57 -0700 |
| commit | 89350d4878aa850624a7fd5d36f981db840fa9af (patch) | |
| tree | 2a39a0488e387706c1f5da390c0f6fbc7ea97878 /src/alloc.c | |
| parent | 7e2f6f8448f9d98e90e0343e2aeba22a7985480f (diff) | |
| download | emacs-89350d4878aa850624a7fd5d36f981db840fa9af.tar.gz emacs-89350d4878aa850624a7fd5d36f981db840fa9af.zip | |
Use mark_objects elsewhere too
* src/alloc.c (mark_vectorlike, mark_face_cache):
* src/eval.c (mark_specpdl):
* src/fringe.c (mark_fringe_data):
* src/keyboard.c (mark_kboards):
Use mark_objects instead of doing it by hand.
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/alloc.c b/src/alloc.c index 2f66b5eef52..6b5bfcbd93a 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -6247,7 +6247,6 @@ mark_vectorlike (union vectorlike_header *header) | |||
| 6247 | { | 6247 | { |
| 6248 | struct Lisp_Vector *ptr = (struct Lisp_Vector *) header; | 6248 | struct Lisp_Vector *ptr = (struct Lisp_Vector *) header; |
| 6249 | ptrdiff_t size = ptr->header.size; | 6249 | ptrdiff_t size = ptr->header.size; |
| 6250 | ptrdiff_t i; | ||
| 6251 | 6250 | ||
| 6252 | eassert (!vector_marked_p (ptr)); | 6251 | eassert (!vector_marked_p (ptr)); |
| 6253 | 6252 | ||
| @@ -6262,8 +6261,7 @@ mark_vectorlike (union vectorlike_header *header) | |||
| 6262 | the number of Lisp_Object fields that we should trace. | 6261 | the number of Lisp_Object fields that we should trace. |
| 6263 | The distinction is used e.g. by Lisp_Process which places extra | 6262 | The distinction is used e.g. by Lisp_Process which places extra |
| 6264 | non-Lisp_Object fields at the end of the structure... */ | 6263 | non-Lisp_Object fields at the end of the structure... */ |
| 6265 | for (i = 0; i < size; i++) /* ...and then mark its elements. */ | 6264 | mark_objects (ptr->contents, size); |
| 6266 | mark_object (ptr->contents[i]); | ||
| 6267 | } | 6265 | } |
| 6268 | 6266 | ||
| 6269 | /* Like mark_vectorlike but optimized for char-tables (and | 6267 | /* Like mark_vectorlike but optimized for char-tables (and |
| @@ -6362,8 +6360,7 @@ mark_face_cache (struct face_cache *c) | |||
| 6362 | { | 6360 | { |
| 6363 | if (c) | 6361 | if (c) |
| 6364 | { | 6362 | { |
| 6365 | int i, j; | 6363 | for (int i = 0; i < c->used; i++) |
| 6366 | for (i = 0; i < c->used; ++i) | ||
| 6367 | { | 6364 | { |
| 6368 | struct face *face = FACE_FROM_ID_OR_NULL (c->f, i); | 6365 | struct face *face = FACE_FROM_ID_OR_NULL (c->f, i); |
| 6369 | 6366 | ||
| @@ -6372,8 +6369,7 @@ mark_face_cache (struct face_cache *c) | |||
| 6372 | if (face->font && !vectorlike_marked_p (&face->font->header)) | 6369 | if (face->font && !vectorlike_marked_p (&face->font->header)) |
| 6373 | mark_vectorlike (&face->font->header); | 6370 | mark_vectorlike (&face->font->header); |
| 6374 | 6371 | ||
| 6375 | for (j = 0; j < LFACE_VECTOR_SIZE; ++j) | 6372 | mark_objects (face->lface, LFACE_VECTOR_SIZE); |
| 6376 | mark_object (face->lface[j]); | ||
| 6377 | } | 6373 | } |
| 6378 | } | 6374 | } |
| 6379 | } | 6375 | } |