]> git.eshelyaron.com Git - emacs.git/commit
Introduce the bignum type
authorTom Tromey <tom@tromey.com>
Sat, 7 Jul 2018 20:52:09 +0000 (14:52 -0600)
committerTom Tromey <tom@tromey.com>
Fri, 13 Jul 2018 04:12:27 +0000 (22:12 -0600)
commita0f2adbfc9cb1b69415f551a5e529f7e1162b9c7
treeb6bf597a851b4ce521097802071361b7c78c4931
parent7cb45cd25e510cf3c20adeb9ac11c0c3ea1dd340
Introduce the bignum type

* src/alloc.c (mark_object): Handle Lisp_Misc_Bignum.
(sweep_misc): Call mpz_clear for Lisp_Misc_Bignum.
* src/data.c (Ftype_of): Handle Lisp_Misc_Bignum.
(Fintegerp, Finteger_or_marker_p, Fnatnump, Fnumberp)
(Fnumber_or_marker_p): Update for bignum.
(Ffixnump, Fbignump): New defuns.
(syms_of_data): Update.
* src/emacs.c (xrealloc_for_gmp, xfree_for_gmp): New functions.
(main): Call mp_set_memory_functions.
* src/lisp.h (enum Lisp_Misc_Type) <Lisp_Misc_Bignum>: New constant.
(struct Lisp_Bignum): New.
(union Lisp_Misc): Add u_bignum.
(BIGNUMP, XBIGNUM, INTEGERP, NATNUMP, NUMBERP, CHECK_NUMBER)
(CHECK_INTEGER, CHECK_NUMBER_COERCE_MARKER): New functions.
* src/print.c (print_object): Handle Lisp_Misc_Bignum.
src/alloc.c
src/data.c
src/emacs.c
src/lisp.h
src/print.c