emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] master b7f83ad: Prefer memset to repeatedly assigning


From: Paul Eggert
Subject: Re: [Emacs-diffs] master b7f83ad: Prefer memset to repeatedly assigning Qnil
Date: Wed, 21 Jan 2015 20:09:41 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

Stefan Monnier wrote:
Can you try and bring most of those cases together in a .h file (presumably
lisp.h)?  I suggest to rename memsetnil to memset_zero_and_nil and to
use it at those places where we set to nil as well as those places where
we set a mix of Lisp_Objects and other fields to zeros and nils.

Sure, I gave that a shot in commit 74244d239e9093035c369721b469529a5fdaf1c6. This uses the name 'memclear', though, as 'memset_zero_and_nil' was so long that it made indenting a pain. There are now just two places that directly assume Qnil is zero, and both are marked with 'verify (NIL_IS_ZERO)'.



reply via email to

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