Subject: bug#36403: 27.0.50; Trivial image.c bugs

From: "Basil L. Contovounesios" <[email-masked]>
Date: Tue, 04 Oct 2022 21:05:17 +0300

Lars Ingebrigtsen [2022-10-04 16:06 +0200] wrote:

> "Basil L. Contovounesios" <[email-masked]> writes:
>
>> -     (setcdr circ1 circ1)
>> -     (setcdr circ2 circ2)
>> -     (and (equal (image-size spec1 t) (cons 1 1))
>> -          (equal (image-size spec2 t) (cons 1 1))))))
>> +    (setcdr circ1 circ1)
>> +    (setcdr circ2 circ2)
>> +    (should (equal (image-size spec1 t) '(1 . 1)))
>> +    (should (equal (image-size spec2 t) '(1 . 1)))))
>
> (cons 1 1) is not eq to (cons 1 1), but '(1 . 1) may or may not be eq to
> '(1 . 1) (depending on whether compiled or phase of the moon), which may
> be why that code is written that way?  But in this case, I can't see how
> it would make a difference...

It doesn't matter whether the calls to image-size return the same
object.  What matters is that both calls succeed (that they return the
correct result is also nice I guess, if that's what you're into ;).

-- 
Basil