2013-09-24 Paul Eggert <eggert@cs.ucla.edu>
+ * dispnew.c (clear_glyph_row, copy_row_except_pointers): Use enums
+ instead of ints, as it's the usual style for offsetof constants. See:
+ http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00478.html
+
* data.c (POPCOUNT_STATIC_INLINE): New macro, as a hack for popcount.
This is ugly, but it should fix the performance problem for older
GCC versions in the short run. I'll look into integrating the
void
clear_glyph_row (struct glyph_row *row)
{
- int off = offsetof (struct glyph_row, used);
+ enum { off = offsetof (struct glyph_row, used) };
/* Zero everything except pointers in `glyphs'. */
memset (row->used, 0, sizeof *row - off);
static void
copy_row_except_pointers (struct glyph_row *to, struct glyph_row *from)
{
- int off = offsetof (struct glyph_row, x);
+ enum { off = offsetof (struct glyph_row, x) };
memcpy (&to->x, &from->x, sizeof *to - off);
}