GNU bug report logs - #75648
Minor safety improvements to fns.c/eval.c

Previous Next

Package: emacs;

Reported by: Pip Cet <pipcet <at> protonmail.com>

Date: Sat, 18 Jan 2025 12:20:02 UTC

Severity: normal

Full log


Message #29 received at 75648 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Pip Cet <pipcet <at> protonmail.com>
Cc: 75648 <at> debbugs.gnu.org
Subject: Re: bug#75648: Minor safety improvements to fns.c/eval.c
Date: Sat, 18 Jan 2025 20:43:01 +0200
> Date: Sat, 18 Jan 2025 16:44:12 +0000
> From: Pip Cet <pipcet <at> protonmail.com>
> Cc: 75648 <at> debbugs.gnu.org
> 
> "Eli Zaretskii" <eliz <at> gnu.org> writes:
> 
> > This is fine by me, but I wonder whether we should replace the NILP
> > tests with !CONSP, when we are about to take XCAR or XCDR?
> 
> (Response to the plist bug fix only, thus I reduced the CC list).
> 
> We should!  I missed that one.  Is it okay if I just use CONSP and
> reverse the arguments? "CONSP (x) ? XCDR (x) : y" makes it a little more
> obvious that the code is safe than "!CONSP (x) ? y : XCDR (x)", IMHO.

Sure, that's okay.




This bug report was last modified 148 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.