emacs-devel
[Top][All Lists]
Advanced

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

Re: [RFC, PATCH] shrink struct vectorlike_header #2


From: Eli Zaretskii
Subject: Re: [RFC, PATCH] shrink struct vectorlike_header #2
Date: Tue, 06 Nov 2012 23:28:34 +0200

> Date: Tue, 06 Nov 2012 12:53:19 -0800
> From: Paul Eggert <address@hidden>
> Cc: Stefan Monnier <address@hidden>,
>       Emacs development discussions <address@hidden>
> 
> > +/* Size of the struct buffer part beyond leading
> > +   Lisp_Objects, in word_size units.  */
> > +
> > +#define BUFFER_REST_SIZE                                               \
> > +  ((sizeof (struct buffer) - header_size) / word_size - BUFFER_LISP_SIZE)
> 
> This assumes (sizeof (struct buffer) - header_size) is a
> multiple of word_size, but that's not necessarily the case.

Shouldn't this use offsetof for safer results?



reply via email to

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