diff options
author | Andy Moreton <andrewjmoreton@gmail.com> | 2018-08-04 10:28:13 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-08-04 10:28:13 -0600 |
commit | bc8ff54efee05f4a2769be32046866ed1e152b41 (patch) | |
tree | c6dac43f3b9abfc6bde54a9d245c04e5dbb360d5 /src/lisp.h | |
parent | 76715f8921dca740880cd22c644a6328cd810846 (diff) | |
download | emacs-bc8ff54efee05f4a2769be32046866ed1e152b41.tar.gz |
Make bignums work better when EMACS_INT is larger than long
* lisp/international/ccl.el (ccl-fixnum): New function.
(ccl-embed-data, ccl-embed-current-address, ccl-dump): Use it.
* src/alloc.c (make_number): Handle case where EMACS_INT is
larger than long.
* src/data.c (bignumcompare): Handle case where EMACS_INT is
larger than long.
(arith_driver): Likewise. Coerce markers.
(float_arith_driver): Coerce markers.
(Flogcount): Use mpz_sgn.
(ash_lsh_impl): Fix bugs.
(Fsub1): Fix underflow check.
* src/lisp.h (NUMBERP): Don't check BIGNUMP.
(CHECK_FIXNUM_OR_FLOAT_COERCE_MARKER): Fix indentation.
* test/lisp/international/ccl-tests.el: New file.
Diffstat (limited to 'src/lisp.h')
-rw-r--r-- | src/lisp.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lisp.h b/src/lisp.h index 4208634fa95..b404f9d89aa 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2778,7 +2778,7 @@ NATNUMP (Lisp_Object x) INLINE bool NUMBERP (Lisp_Object x) { - return INTEGERP (x) || FLOATP (x) || BIGNUMP (x); + return INTEGERP (x) || FLOATP (x); } INLINE bool @@ -2947,7 +2947,7 @@ CHECK_INTEGER (Lisp_Object x) if (MARKERP (x)) \ XSETFASTINT (x, marker_position (x)); \ else \ - CHECK_TYPE (FIXED_OR_FLOATP (x), Qnumber_or_marker_p, x); \ + CHECK_TYPE (FIXED_OR_FLOATP (x), Qnumber_or_marker_p, x); \ } while (false) #define CHECK_NUMBER_COERCE_MARKER(x) \ |