[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.
0001-Allow-gap-before-first-non-Lisp-pseudovec-member.patch
Description: Text Data
- Re: buffer.c/buffer.h: How to add new buffer-local variables?, Keith David Bershatsky, 2019/04/08
- Re: buffer.c/buffer.h: How to add new buffer-local variables?, Eli Zaretskii, 2019/04/08
- Re: buffer.c/buffer.h: How to add new buffer-local variables?, Eli Zaretskii, 2019/04/08
- Re: buffer.c/buffer.h: How to add new buffer-local variables?, Andreas Schwab, 2019/04/08
- Re: buffer.c/buffer.h: How to add new buffer-local variables?, Eli Zaretskii, 2019/04/08
- Re: buffer.c/buffer.h: How to add new buffer-local variables?, Stefan Monnier, 2019/04/08
- Re: buffer.c/buffer.h: How to add new buffer-local variables?,
Paul Eggert <=
- Re: buffer.c/buffer.h: How to add new buffer-local variables?, Michael Welsh Duggan, 2019/04/08
- Re: buffer.c/buffer.h: How to add new buffer-local variables?, Paul Eggert, 2019/04/08
- Re: buffer.c/buffer.h: How to add new buffer-local variables?, Eli Zaretskii, 2019/04/09