diff options
| author | Andy Moreton | 2018-08-04 10:28:13 -0600 |
|---|---|---|
| committer | Tom Tromey | 2018-08-04 10:28:13 -0600 |
| commit | bc8ff54efee05f4a2769be32046866ed1e152b41 (patch) | |
| tree | c6dac43f3b9abfc6bde54a9d245c04e5dbb360d5 /src/lisp.h | |
| parent | 76715f8921dca740880cd22c644a6328cd810846 (diff) | |
| download | emacs-bc8ff54efee05f4a2769be32046866ed1e152b41.tar.gz emacs-bc8ff54efee05f4a2769be32046866ed1e152b41.zip | |
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) | |||
| 2778 | INLINE bool | 2778 | INLINE bool |
| 2779 | NUMBERP (Lisp_Object x) | 2779 | NUMBERP (Lisp_Object x) |
| 2780 | { | 2780 | { |
| 2781 | return INTEGERP (x) || FLOATP (x) || BIGNUMP (x); | 2781 | return INTEGERP (x) || FLOATP (x); |
| 2782 | } | 2782 | } |
| 2783 | 2783 | ||
| 2784 | INLINE bool | 2784 | INLINE bool |
| @@ -2947,7 +2947,7 @@ CHECK_INTEGER (Lisp_Object x) | |||
| 2947 | if (MARKERP (x)) \ | 2947 | if (MARKERP (x)) \ |
| 2948 | XSETFASTINT (x, marker_position (x)); \ | 2948 | XSETFASTINT (x, marker_position (x)); \ |
| 2949 | else \ | 2949 | else \ |
| 2950 | CHECK_TYPE (FIXED_OR_FLOATP (x), Qnumber_or_marker_p, x); \ | 2950 | CHECK_TYPE (FIXED_OR_FLOATP (x), Qnumber_or_marker_p, x); \ |
| 2951 | } while (false) | 2951 | } while (false) |
| 2952 | 2952 | ||
| 2953 | #define CHECK_NUMBER_COERCE_MARKER(x) \ | 2953 | #define CHECK_NUMBER_COERCE_MARKER(x) \ |