|
From: | Paul Eggert |
Subject: | Re: [PATCH] Change module interface to no longer use GMP objects directly. |
Date: | Sat, 23 Nov 2019 15:10:27 -0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 |
On 11/23/19 12:08 PM, Philipp Stephani wrote:
stdio.h is part of the C implementation, but emacs-module.h is not.
> 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.
What difference does that make to the module developer? emacs-module.h includes <stdint.h> and other files that are implementation-dependent. Because of this, from the developer's point of view "#include <emacs-module.h>" is just as implementation-dependent as "#include <stdio.h>" is, which means developers must be cognizant of platform dependencies anyway.
So I still don't why it's crucial that emacs-module.h is byte-for-byte identical on all platforms.
- 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.
Thanks, that'll be an improvement.
[Prev in Thread] | Current Thread | [Next in Thread] |