summaryrefslogtreecommitdiff
path: root/src/buffer.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-07-06 14:53:56 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-07-06 14:53:56 -0700
commit22b4128ef0160a0fab35a5d6dfc0f6a55c8bad93 (patch)
tree77f5318c4497f9d95bac3532afc6500c3a01047c /src/buffer.h
parente0457abee89abfe781a02de58ca6c35041e0e5d9 (diff)
downloademacs-22b4128ef0160a0fab35a5d6dfc0f6a55c8bad93.tar.gz
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
/* Everything from here down must be a Lisp_Object. */
/* buffer-local Lisp variables start at `undo_list',
tho only the ones from `name' on are GC'd normally. */
+ #define FIRST_FIELD_PER_BUFFER undo_list
/* Changes in the buffer are recorded here for undo.
t means don't record anything.
@@ -846,6 +847,9 @@ struct buffer
t means to use hollow box cursor.
See `cursor-type' for other values. */
Lisp_Object BUFFER_INTERNAL_FIELD (cursor_in_non_selected_windows);
+
+ /* This must be the last field in the above list. */
+ #define LAST_FIELD_PER_BUFFER cursor_in_non_selected_windows
};