diff options
author | Tom Tromey <tom@tromey.com> | 2018-07-19 15:58:10 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-07-19 16:08:41 -0600 |
commit | 76715f8921dca740880cd22c644a6328cd810846 (patch) | |
tree | d85940e4c452575c453ab3ea6a7d0ec25b20f2ab /src/emacs-module.c | |
parent | 678881e428073b39a906c1ffd01e1b76e271cb5d (diff) | |
download | emacs-feature/bignum.tar.gz |
Fix bignum creation when EMACS_INT is wider than longfeature/bignum
* src/alloc.c (mpz_set_intmax_slow, mpz_set_uintmax_slow): New
functions.
* src/data.c (arith_driver, Frem, Fmod, ash_lsh_impl, Fadd1)
(Fsub1): Use mpz_set_intmax, mpz_set_uintmax.
* src/emacs-module.c (module_make_integer): Use mpz_set_intmax.
* src/floatfns.c (Fabs): Use mpz_set_intmax.
* src/lisp.h (mpz_set_intmax, mpz_set_uintmax): New inline
functions.
(mpz_set_uintmax_slow, mpz_set_intmax_slow): Declare.
Diffstat (limited to 'src/emacs-module.c')
-rw-r--r-- | src/emacs-module.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/emacs-module.c b/src/emacs-module.c index 7709eeca94a..39150f6f67b 100644 --- a/src/emacs-module.c +++ b/src/emacs-module.c @@ -536,7 +536,8 @@ module_make_integer (emacs_env *env, intmax_t n) if (FIXNUM_OVERFLOW_P (n)) { mpz_t val; - mpz_init_set_si (val, n); + mpz_init (val); + mpz_set_intmax (val, n); obj = make_number (val); mpz_clear (val); } |