emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 2/2] Add module functions to convert from and to big integers


From: Paul Eggert
Subject: Re: [PATCH 2/2] Add module functions to convert from and to big integers.
Date: Tue, 23 Apr 2019 07:51:33 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

On 4/23/19 6:17 AM, Philipp Stephani wrote:
> address@hidden Function bool extract_big_integer (emacs_env address@hidden, 
> emacs_value @var{arg}, int address@hidden, ptrdiff_t address@hidden, unsigned 
> char address@hidden)y

This sounds reasonably inconvenient for authors of modules, plus it's a
pain to document. Why not just assume GMP instead? It's pretty unlikely
authors would use anything else for bignums. This should simplify the
code not only on the Emacs side but also on the module side; plus it
should improve performance by avoiding roundtrips through mpz_export and
mpz_import.

If a module author really wanted the array-of-unsigned-char
representation (which they probably wouldn't), you could supply a simple
conversion module to help them do that.

Similarly for make_big_integer.




reply via email to

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