[Top][All Lists]

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

Re: [PATCH] Change module interface to no longer use GMP objects directl

From: Philipp Stephani
Subject: Re: [PATCH] Change module interface to no longer use GMP objects directly.
Date: Sat, 23 Nov 2019 21:08:50 +0100

Am Sa., 23. Nov. 2019 um 03:13 Uhr schrieb Paul Eggert <address@hidden>:
> On 11/21/19 12:31 PM, Philipp Stephani wrote:
> > It's crucial that there's a single canonical emacs-module.h.
> I don't see why it's crucial. Certainly emacs-module.h will differ for
> different Emacs versions,

But only in very specific backwards-compatible ways.

> and people will deal with any mismatches as
> usual. And developers do not expect /usr/include/stdio.h to be the same
> on all platforms; why would they expect /usr/include/emacs-module.h to
> be the same?

Because stdio.h is part of the C implementation, but emacs-module.h is not.

> After all, modules themselves will not be portable among
> platforms, even if the module's sources and include files are
> byte-for-byte identical.

Yes, but we still at least need the header to remain the same across
time and across configuration options within each platform. Having the
header depend on configure makes it almost impossible to guarantee

In the interest of not blocking the Emacs 27 release on this, and
unless Eli objects, I'll push my original patch to master within the
next few days, with the following minor modifications:

- Documenting the restriction on the number of magnitude array elements.
- Using a typedef emacs_limb_t for the magnitude array elements, with
the guarantee that's is a stable unsigned integer type. I will make
emacs_limb_t an alias of unsigned long long if ULONG_MAX <=
0xFFFFFFFF, and an alias of unsigned long otherwise.
- Fixing the example code.

reply via email to

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