[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#36403: 27.0.50; Trivial image.c bugs
From: |
Lars Ingebrigtsen |
Subject: |
bug#36403: 27.0.50; Trivial image.c bugs |
Date: |
Fri, 21 Aug 2020 13:26:25 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Pip Cet <pipcet@gmail.com> writes:
> Paul's suggestion was to use equal () instead of !NILP (Fequal (...)).
> I'm against that, because the F in Fequal kind of hints at the
> difficulties of using equal, of which there are many: in the current
> implementation, it can signal, quit, be asymmetric (signalling for
> (equal a b) whereas (equal b a) works), and is susceptible to equality
> bombs that take forever to compare.
Yeah, your equal_lists is better in all ways, I think. It should be
much faster, too -- Fequal on a list checks whether the string members
are equal, too, which is slow. So I think this will speed things up if
you have a buffer that displays images where the data comes from a
string (which can be huge) instead of a file.
> Replacing !NILP is a better idea, but I'm struggling to come up with a
> good name for that. But even a bad name would be an improvement.
TRUEP is kinda obvious, isn't it? Although I guess some people would
object on the grounds that only t is true, while all other non-nil
values are only trueish.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no