diff options
author | Tom Tromey <tom@tromey.com> | 2018-07-07 23:42:10 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-07-12 22:12:28 -0600 |
commit | 3dea8f8f53f81a1d15a55c9e3c87a7eade7ca273 (patch) | |
tree | 1f543cc1ccfe3552011f899d8f8e132ee9c7c276 /src/lisp.h | |
parent | d0fac17abdf6883bbf82b1752988db38d05282e6 (diff) | |
download | emacs-3dea8f8f53f81a1d15a55c9e3c87a7eade7ca273.tar.gz |
Make % and mod handle bignums
* src/data.c (Frem, Fmod): Handle bignums.
* src/lisp.h (CHECK_INTEGER_COERCE_MARKER): New macro.
* test/src/data-tests.el (data-tests-check-sign)
(data-tests-%-mod): New tests.
Diffstat (limited to 'src/lisp.h')
-rw-r--r-- | src/lisp.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lisp.h b/src/lisp.h index 63b057073d0..846e955d3af 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2958,6 +2958,14 @@ CHECK_INTEGER (Lisp_Object x) CHECK_TYPE (NUMBERP (x), Qnumber_or_marker_p, x); \ } while (false) +#define CHECK_INTEGER_COERCE_MARKER(x) \ + do { \ + if (MARKERP (x)) \ + XSETFASTINT (x, marker_position (x)); \ + else \ + CHECK_TYPE (INTEGERP (x), Qnumber_or_marker_p, x); \ + } while (false) + /* Since we can't assign directly to the CAR or CDR fields of a cons cell, use these when checking that those fields contain numbers. */ INLINE void |