diff options
| author | Paul Eggert | 2011-07-06 14:56:44 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-07-06 14:56:44 -0700 |
| commit | 437dd18bf116330a43585f85aac12e6a8171b8a2 (patch) | |
| tree | 940d7fb2657b6aedaa007842c59b703ca9727e5e /src/buffer.h | |
| parent | 4906cd3d170f550150b28a22c2000dd0b4ff326f (diff) | |
| parent | 22b4128ef0160a0fab35a5d6dfc0f6a55c8bad93 (diff) | |
| download | emacs-437dd18bf116330a43585f85aac12e6a8171b8a2.tar.gz emacs-437dd18bf116330a43585f85aac12e6a8171b8a2.zip | |
Merge: 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.h | 4 |
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 | ||