[Top][All Lists]

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

Re: bignum branch

From: Andy Moreton
Subject: Re: bignum branch
Date: Fri, 03 Aug 2018 20:16:05 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt)

On Fri 03 Aug 2018, Tom Tromey wrote:

>>>>>> "Eli" == Eli Zaretskii <address@hidden> writes:
> Eli> Btw, isn't it confusing that INTEGERP allows fixnums and bignums, but
> Eli> XINT, XFASTINT, and XSETINT work only with fixnums?  I envision quite
> Eli> a few of potential bugs due to this semantic discrepancy, like the one
> Eli> you just fixed:
>>> - fix NUMBERP to remove redundant BIGNUMP test (ensured by INTEGERP)
> Eli> Should we have a different name for what is now INTEGERP?  Like
> Eli> WHOLENUMP, for example?
> Paul suggested this and it made sense to me, as a bignum is an integer.
> Perhaps one fix would be to take some of the renaming further and use

Yes. Also perhaps change XBIGNUM to:

    INLINE struct Lisp_Bignum *
    XBIGNUM (Lisp_Object a)
      eassert (BIGNUMP (a));
      return XUNTAG (a, Lisp_Misc, struct Lisp_Bignum)->value;

That allows "XBIGNUM(value)->value" to be replaced with "XBIGNUM(value)"
in all callers.


reply via email to

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