Commit 29d823d6 authored by Gerd Moellmann's avatar Gerd Moellmann
Browse files

(FLOAT_TO_INT2, FLOAT_TO_INT): Use FIXNUM_OVERFLOW_P.

parent f8edfd76
......@@ -183,8 +183,7 @@ static char *float_error_fn_name;
#define FLOAT_TO_INT(x, i, name, num) \
do \
{ \
if ((x) >= (((EMACS_INT) 1) << (VALBITS-1)) || \
(x) <= - (((EMACS_INT) 1) << (VALBITS-1)) - 1) \
if (FIXNUM_OVERFLOW_P (x)) \
range_error (name, num); \
XSETINT (i, (EMACS_INT)(x)); \
} \
......@@ -192,8 +191,7 @@ static char *float_error_fn_name;
#define FLOAT_TO_INT2(x, i, name, num1, num2) \
do \
{ \
if ((x) >= (((EMACS_INT) 1) << (VALBITS-1)) || \
(x) <= - (((EMACS_INT) 1) << (VALBITS-1)) - 1) \
if (FIXNUM_OVERFLOW_P (x)) \
range_error2 (name, num1, num2); \
XSETINT (i, (EMACS_INT)(x)); \
} \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment