summaryrefslogtreecommitdiff
path: root/src/xwidget.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2019-04-08 12:59:22 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2019-04-08 13:01:21 -0700
commita038df77de7b1aa2d73a6478493b8838b59e4982 (patch)
treefbaa0087bab52a815dfd249d189301e53de0d345 /src/xwidget.c
parent31e9087cdcd0b78b2247c3d8532290881abfbb08 (diff)
downloademacs-a038df77de7b1aa2d73a6478493b8838b59e4982.tar.gz
Allow gap before first non-Lisp pseudovec member
Problem reported by Keith David Bershatsky in: https://lists.gnu.org/r/emacs-devel/2019-04/msg00259.html Solution suggested by Stefan Monnier in: https://lists.gnu.org/r/emacs-devel/2019-04/msg00282.html * src/buffer.h (BUFFER_LISP_SIZE): Simplify by using PSEUDOVECSIZE. (BUFFER_REST_SIZE): Simplify by using VECSIZE and BUFFER_LISP_SIZE. * src/lisp.h (PSEUDOVECSIZE): Base it on the last Lisp field, not the first non-Lisp field. All callers changed. Callers without Lisp fields changed to use ALLOCATE_PLAIN_PSEUDOVECTOR. (ALLOCATE_PLAIN_PSEUDOVECTOR): New macro.
Diffstat (limited to 'src/xwidget.c')
-rw-r--r--src/xwidget.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/xwidget.c b/src/xwidget.c
index c56284928e3..2486a2d4da8 100644
--- a/src/xwidget.c
+++ b/src/xwidget.c
@@ -41,14 +41,13 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
static struct xwidget *
allocate_xwidget (void)
{
- return ALLOCATE_PSEUDOVECTOR (struct xwidget, height, PVEC_XWIDGET);
+ return ALLOCATE_PSEUDOVECTOR (struct xwidget, script_callbacks, PVEC_XWIDGET);
}
static struct xwidget_view *
allocate_xwidget_view (void)
{
- return ALLOCATE_PSEUDOVECTOR (struct xwidget_view, redisplayed,
- PVEC_XWIDGET_VIEW);
+ return ALLOCATE_PSEUDOVECTOR (struct xwidget_view, w, PVEC_XWIDGET_VIEW);
}
#define XSETXWIDGET(a, b) XSETPSEUDOVECTOR (a, b, PVEC_XWIDGET)