aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.h
diff options
context:
space:
mode:
authorPaul Eggert2011-07-06 14:53:56 -0700
committerPaul Eggert2011-07-06 14:53:56 -0700
commit22b4128ef0160a0fab35a5d6dfc0f6a55c8bad93 (patch)
tree77f5318c4497f9d95bac3532afc6500c3a01047c /src/buffer.h
parente0457abee89abfe781a02de58ca6c35041e0e5d9 (diff)
downloademacs-22b4128ef0160a0fab35a5d6dfc0f6a55c8bad93.tar.gz
emacs-22b4128ef0160a0fab35a5d6dfc0f6a55c8bad93.zip
Remove unportable assumption about struct layout (Bug#8884).
* buffer.c (clone_per_buffer_values): Don't assume that sizeof (struct buffer) is a multiple of sizeof (Lisp_Object). This isn't true in general, and it's particularly not true if Emacs is configured with --with-wide-int. * buffer.h (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER): New macros, used in the buffer.c change.
Diffstat (limited to 'src/buffer.h')
-rw-r--r--src/buffer.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/buffer.h b/src/buffer.h
index 4643e0d9d0e..06864dd5789 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -612,6 +612,7 @@ struct buffer
612 /* Everything from here down must be a Lisp_Object. */ 612 /* Everything from here down must be a Lisp_Object. */
613 /* buffer-local Lisp variables start at `undo_list', 613 /* buffer-local Lisp variables start at `undo_list',
614 tho only the ones from `name' on are GC'd normally. */ 614 tho only the ones from `name' on are GC'd normally. */
615 #define FIRST_FIELD_PER_BUFFER undo_list
615 616
616 /* Changes in the buffer are recorded here for undo. 617 /* Changes in the buffer are recorded here for undo.
617 t means don't record anything. 618 t means don't record anything.
@@ -846,6 +847,9 @@ struct buffer
846 t means to use hollow box cursor. 847 t means to use hollow box cursor.
847 See `cursor-type' for other values. */ 848 See `cursor-type' for other values. */
848 Lisp_Object BUFFER_INTERNAL_FIELD (cursor_in_non_selected_windows); 849 Lisp_Object BUFFER_INTERNAL_FIELD (cursor_in_non_selected_windows);
850
851 /* This must be the last field in the above list. */
852 #define LAST_FIELD_PER_BUFFER cursor_in_non_selected_windows
849}; 853};
850 854
851 855