[Top][All Lists]

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

Re: Merging bignum to master

From: Andy Moreton
Subject: Re: Merging bignum to master
Date: Thu, 16 Aug 2018 00:57:10 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.50 (windows-nt)

On Wed 15 Aug 2018, Pip Cet wrote:

> If you really think XFIXNUMFWD is a good name, don't you at least
> agree that it should go with renaming other references to intfwds to
> fixnumfwds? Right now we have:
> static struct Lisp_Intfwd *
> XFIXNUMFWD (union Lisp_Fwd *a)
> {
>   eassert (INTFWDP (a));
>   return &a->u_intfwd;
> }

Please don't top-post on technical mailing lists.

XFIXNUMFWD might not be pretty, but it does convey the idea that this is
code that only understands fixnums (the same as pre-bignum emacs), and
will need careful inspection before modifying it to support bignums.

> I still think that's clearly a case of over-eager replacement (XINT ->
> XFIXNUM). To have XFIXNUMFWD but INTFWDP seems obviously wrong to me.

The XINT -> XFIXNUM renaming preserved the meaning from pre-bignum
emacs i.e. only fixnums are supported.

It would seem sensible to rename INTFWDP -> FIXNUMFWDP to keep the
naming consistent, and then extend the code to support bignums later.

One thing to be careful of here is that on 64bit Windows builds of
emacs, sizeof (EMACS_INT) is 64bit but sizeof (long) is 32bit. This
requires careful use of the GMP library API, which does not accept long
long inputs (see mpz_set_intmax and mpz_set_uintmax in lisp.h).


reply via email to

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