Commit cf647d93 authored by Paul Eggert's avatar Paul Eggert

* 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
parent 4710d6f4
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
......
......@@ -838,7 +838,7 @@ clear_window_matrices (struct window *w, bool desired_p)
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);
......@@ -988,7 +988,7 @@ swap_glyph_pointers (struct glyph_row *a, struct glyph_row *b)
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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment