From: Tom Tromey Date: Sat, 7 Jul 2018 21:32:30 +0000 (-0600) Subject: Make eql work for bignums X-Git-Tag: emacs-27.0.90~4598^2~36 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=580d173b9a7db78f6d62972ef8e943d31dde5c9d;p=emacs.git Make eql work for bignums * src/fns.c (Feql, internal_equal): Handle bignums. --- diff --git a/src/fns.c b/src/fns.c index ec88f8476c3..b14481d0101 100644 --- a/src/fns.c +++ b/src/fns.c @@ -2174,7 +2174,7 @@ DEFUN ("eql", Feql, Seql, 2, 2, 0, Floating-point numbers of equal value are `eql', but they may not be `eq'. */) (Lisp_Object obj1, Lisp_Object obj2) { - if (FLOATP (obj1)) + if (FLOATP (obj1) || BIGNUMP (obj1)) return equal_no_quit (obj1, obj2) ? Qt : Qnil; else return EQ (obj1, obj2) ? Qt : Qnil; @@ -2322,6 +2322,8 @@ internal_equal (Lisp_Object o1, Lisp_Object o2, enum equal_kind equal_kind, && (XMARKER (o1)->buffer == 0 || XMARKER (o1)->bytepos == XMARKER (o2)->bytepos)); } + if (BIGNUMP (o1)) + return mpz_cmp (XBIGNUM (o1)->value, XBIGNUM (o2)->value) == 0; break; case Lisp_Vectorlike: