bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#56723: CHECK_INTEGER reports the wrong predicate -- see for example


From: Jeronimo Pellegrini
Subject: bug#56723: CHECK_INTEGER reports the wrong predicate -- see for example (ash 1.0 1)
Date: Sat, 23 Jul 2022 08:47:56 -0300

Package: emacs
Version: 29.0.50 -- 9171fa09332df615832240e98c247638019c0211
Severity: minor

Hello!

CHECK_INTEGER, defined in lisp.h, seems to report the wrong predicate,
although it does check the argument correctly:

INLINE void
CHECK_INTEGER (Lisp_Object x)
{
  CHECK_TYPE (INTEGERP (x), Qnumberp, x);
                            ^^^^^^^^

That makes, for example (ash 1.1 1) signal an error with the message
"Wrong type argument: numberp, 1.1" (it should be integerp, not
numberp). The same for logcount, and other functions that require
integers -- they will all complain that "1.1" is not a number.

Perhaps Qnumberp should be changed to Qintegerp in  line 3149 of lisp.h?
That seems to fix it for me.

(I don't include a patch because there were issues in the past with me
trying to contribute to tramp. Nothing serious: my employer, a public
University, is happy to release the code under the GNU GPL, but won't
transfer copyright)

J.





reply via email to

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