{
struct Lisp_Vector *ptr = (struct Lisp_Vector *) header;
ptrdiff_t size = ptr->header.size;
- ptrdiff_t i;
eassert (!vector_marked_p (ptr));
the number of Lisp_Object fields that we should trace.
The distinction is used e.g. by Lisp_Process which places extra
non-Lisp_Object fields at the end of the structure... */
- for (i = 0; i < size; i++) /* ...and then mark its elements. */
- mark_object (ptr->contents[i]);
+ mark_objects (ptr->contents, size);
}
/* Like mark_vectorlike but optimized for char-tables (and
{
if (c)
{
- int i, j;
- for (i = 0; i < c->used; ++i)
+ for (int i = 0; i < c->used; i++)
{
struct face *face = FACE_FROM_ID_OR_NULL (c->f, i);
if (face->font && !vectorlike_marked_p (&face->font->header))
mark_vectorlike (&face->font->header);
- for (j = 0; j < LFACE_VECTOR_SIZE; ++j)
- mark_object (face->lface[j]);
+ mark_objects (face->lface, LFACE_VECTOR_SIZE);
}
}
}
mark_object (backtrace_function (pdl));
if (nargs == UNEVALLED)
nargs = 1;
- while (nargs--)
- mark_object (backtrace_args (pdl)[nargs]);
+ mark_objects (backtrace_args (pdl), nargs);
}
break;
void
mark_fringe_data (void)
{
- int i;
-
- for (i = 0; i < max_fringe_bitmaps; i++)
- if (!NILP (fringe_faces[i]))
- mark_object (fringe_faces[i]);
+ mark_objects (fringe_faces, max_fringe_bitmaps);
}
/* Initialize this module when Emacs starts. */
void
mark_kboards (void)
{
- KBOARD *kb;
- Lisp_Object *p;
- for (kb = all_kboards; kb; kb = kb->next_kboard)
+ for (KBOARD *kb = all_kboards; kb; kb = kb->next_kboard)
{
if (kb->kbd_macro_buffer)
- for (p = kb->kbd_macro_buffer; p < kb->kbd_macro_ptr; p++)
- mark_object (*p);
+ mark_objects (kb->kbd_macro_buffer,
+ kb->kbd_macro_ptr - kb->kbd_macro_buffer);
mark_object (KVAR (kb, Voverriding_terminal_local_map));
mark_object (KVAR (kb, Vlast_command));
mark_object (KVAR (kb, Vreal_last_command));