emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r114453: * dispnew.c (clear_glyph_row, copy_row_exce


From: Paul Eggert
Subject: [Emacs-diffs] trunk r114453: * dispnew.c (clear_glyph_row, copy_row_except_pointers): Use enums
Date: Tue, 24 Sep 2013 15:29:32 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 114453
revision-id: address@hidden
parent: address@hidden
author: Paul Eggert  <address@hidden>
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Tue 2013-09-24 08:29:27 -0700
message:
  * 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
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/dispnew.c                  dispnew.c-20091113204419-o5vbwnq5f7feedwu-258
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2013-09-24 14:53:49 +0000
+++ b/src/ChangeLog     2013-09-24 15:29:27 +0000
@@ -1,5 +1,9 @@
 2013-09-24  Paul Eggert  <address@hidden>
 
+       * 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

=== modified file 'src/dispnew.c'
--- a/src/dispnew.c     2013-09-24 07:16:38 +0000
+++ b/src/dispnew.c     2013-09-24 15:29:27 +0000
@@ -838,7 +838,7 @@
 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 @@
 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);
 }


reply via email to

[Prev in Thread] Current Thread [Next in Thread]