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: Stefan Monnier
Subject: Re: [RFC, PATCH] shrink struct vectorlike_header #2
Date: Tue, 06 Nov 2012 13:17:59 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

> +/* When V is on the free list, first word after header is
> +   used as a pointer to next vector on the free list.  */
> +
> +#define NEXT_IN_FREE_LIST(v)                         \
> +  (*(struct Lisp_Vector **)((char *) v + header_size))
> +
>  /* Common shortcut to setup vector on a free list.  */

Why change the comment rather than the code.  IOW what don't you like in:

   Please make the code match the comment, e.g:
     (*(struct Lisp_Vector **)&(v->contents[0]))

I personally find it much more elegant and robust than doing pointer
arithmetic via conversion to char*.

The rest looks fine, tho it still probably lacks the corresponding
changes in .gdbinit, right?


        Stefan



reply via email to

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