diff options
| author | Paul Eggert | 2011-07-06 15:22:32 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-07-06 15:22:32 -0700 |
| commit | 8a5c77bba5e38c62605f0f053670a7955130fcc7 (patch) | |
| tree | 1e8151eafcd78b625cd097340d066d79ce5a25f2 /src/buffer.c | |
| parent | 437dd18bf116330a43585f85aac12e6a8171b8a2 (diff) | |
| download | emacs-8a5c77bba5e38c62605f0f053670a7955130fcc7.tar.gz emacs-8a5c77bba5e38c62605f0f053670a7955130fcc7.zip | |
Remove more assumptions re struct layout (Bug#8884).
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/buffer.c b/src/buffer.c index 6c7c2ec0d86..e2f34d629e9 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -830,8 +830,8 @@ reset_buffer_local_variables (register struct buffer *b, int permanent_too) | |||
| 830 | 830 | ||
| 831 | /* buffer-local Lisp variables start at `undo_list', | 831 | /* buffer-local Lisp variables start at `undo_list', |
| 832 | tho only the ones from `name' on are GC'd normally. */ | 832 | tho only the ones from `name' on are GC'd normally. */ |
| 833 | for (offset = PER_BUFFER_VAR_OFFSET (undo_list); | 833 | for (offset = PER_BUFFER_VAR_OFFSET (FIRST_FIELD_PER_BUFFER); |
| 834 | offset < sizeof *b; | 834 | offset <= PER_BUFFER_VAR_OFFSET (LAST_FIELD_PER_BUFFER); |
| 835 | offset += sizeof (Lisp_Object)) | 835 | offset += sizeof (Lisp_Object)) |
| 836 | { | 836 | { |
| 837 | int idx = PER_BUFFER_IDX (offset); | 837 | int idx = PER_BUFFER_IDX (offset); |
| @@ -1055,8 +1055,8 @@ No argument or nil as argument means use current buffer as BUFFER. */) | |||
| 1055 | 1055 | ||
| 1056 | /* buffer-local Lisp variables start at `undo_list', | 1056 | /* buffer-local Lisp variables start at `undo_list', |
| 1057 | tho only the ones from `name' on are GC'd normally. */ | 1057 | tho only the ones from `name' on are GC'd normally. */ |
| 1058 | for (offset = PER_BUFFER_VAR_OFFSET (undo_list); | 1058 | for (offset = PER_BUFFER_VAR_OFFSET (FIRST_FIELD_PER_BUFFER); |
| 1059 | offset < sizeof (struct buffer); | 1059 | offset <= PER_BUFFER_VAR_OFFSET (LAST_FIELD_PER_BUFFER); |
| 1060 | /* sizeof EMACS_INT == sizeof Lisp_Object */ | 1060 | /* sizeof EMACS_INT == sizeof Lisp_Object */ |
| 1061 | offset += (sizeof (EMACS_INT))) | 1061 | offset += (sizeof (EMACS_INT))) |
| 1062 | { | 1062 | { |