]> git.eshelyaron.com Git - emacs.git/commit
Minor fixups for intmax_t→mpz_t conversion
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 19 Aug 2018 03:40:10 +0000 (20:40 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 19 Aug 2018 03:41:09 +0000 (20:41 -0700)
commitb1840206ff22359fc099236602928e0fb3828d66
treedc7a23519474955ed4efcbd975c79c0629a96a2b
parent6eade1efde873d0b048d8f2841646924cb2ceb16
Minor fixups for intmax_t→mpz_t conversion

* src/alloc.c (mpz_set_intmax_slow): Tighten assertion.
Work even in the unlikely case where libgmp uses nails.
* src/data.c (FIXNUMS_FIT_IN_LONG): New constant.
(arith_driver): Use it to tighten compile-time checks.
* src/lisp.h (mpz_set_intmax): Do not assume that converting
an out-of-range value to ‘long’ is harmless, as it might raise
a signal.  Use simpler expression; compiler can optimize.
src/alloc.c
src/data.c
src/lisp.h