emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: buffer.c/buffer.h: How to add new buffer-local variables?


From: Paul Eggert
Subject: Re: buffer.c/buffer.h: How to add new buffer-local variables?
Date: Mon, 8 Apr 2019 13:07:22 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

On 4/8/19 11:33 AM, Stefan Monnier wrote:
> We could also use the last Lisp_Object element as the anchor (taking its
> offset plus its size as the "end offset").

Yes, that's a simple way to fix the problem. I was working on this idea
when I read your email. Also, I noticed that the problem could
potentially happen to any pseudovector, not just to buffers. I installed
the attached into master to fix the problem with other pseudovectors too.

This patch doesn't solve the general portability issue in this area, as
the C standard guarantees only that struct members are aligned and don't
overlap and are in increasing address order. But it should be enough to
fix the immediate problem.

Attachment: 0001-Allow-gap-before-first-non-Lisp-pseudovec-member.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]