[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r105000: Merge: Remove unportable ass
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r105000: Merge: Remove unportable assumption about struct layout (Bug#8884). |
Date: |
Wed, 06 Jul 2011 14:56:44 -0700 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 105000 [merge]
fixes bug(s): http://debbugs.gnu.org/8884
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Wed 2011-07-06 14:56:44 -0700
message:
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.
modified:
src/ChangeLog
src/buffer.c
src/buffer.h
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2011-07-05 09:51:56 +0000
+++ b/src/ChangeLog 2011-07-06 21:53:56 +0000
@@ -1,3 +1,13 @@
+2011-07-06 Paul Eggert <address@hidden>
+
+ 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.
+
2011-07-05 Jan Djärv <address@hidden>
* xsettings.c: Use both GConf and GSettings if both are available.
=== modified file 'src/buffer.c'
--- a/src/buffer.c 2011-07-04 15:32:22 +0000
+++ b/src/buffer.c 2011-07-06 21:53:56 +0000
@@ -471,8 +471,8 @@
/* buffer-local Lisp variables start at `undo_list',
tho only the ones from `name' on are GC'd normally. */
- for (offset = PER_BUFFER_VAR_OFFSET (undo_list);
- offset < sizeof *to;
+ for (offset = PER_BUFFER_VAR_OFFSET (FIRST_FIELD_PER_BUFFER);
+ offset <= PER_BUFFER_VAR_OFFSET (LAST_FIELD_PER_BUFFER);
offset += sizeof (Lisp_Object))
{
Lisp_Object obj;
=== modified file 'src/buffer.h'
--- a/src/buffer.h 2011-06-21 21:32:10 +0000
+++ b/src/buffer.h 2011-07-06 21:53:56 +0000
@@ -612,6 +612,7 @@
/* 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 @@
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
};
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r105000: Merge: Remove unportable assumption about struct layout (Bug#8884).,
Paul Eggert <=