[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
> XFIXNUM, XFASTFIXNUM, and XSETFIXNUM.
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.
AndyM
- Re: bignum branch, (continued)
- Re: bignum branch, Achim Gratz, 2018/08/04
- Re: bignum branch, Eli Zaretskii, 2018/08/04
- Re: bignum branch, Andy Moreton, 2018/08/04
- Re: bignum branch, Tom Tromey, 2018/08/04
- Re: bignum branch, Robert Pluim, 2018/08/06
- Re: bignum branch, Tom Tromey, 2018/08/06
- Re: bignum branch, Andy Moreton, 2018/08/07
- Re: bignum branch, Tom Tromey, 2018/08/07
- Re: bignum branch, Tom Tromey, 2018/08/04
Re: bignum branch, Tom Tromey, 2018/08/03
- Re: bignum branch,
Andy Moreton <=
- Re: bignum branch, Eli Zaretskii, 2018/08/04
- Re: bignum branch, Andy Moreton, 2018/08/05
- Re: bignum branch, Eli Zaretskii, 2018/08/05
- Re: bignum branch, Andy Moreton, 2018/08/06
- Re: bignum branch, Tom Tromey, 2018/08/06
- Re: bignum branch, Paul Eggert, 2018/08/06
- Re: bignum branch, Tom Tromey, 2018/08/06
- Re: bignum branch, Tom Tromey, 2018/08/07
- Re: bignum branch, Andy Moreton, 2018/08/07
- Re: bignum branch, Paul Eggert, 2018/08/07