summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>2001-10-06 23:44:55 +0000
committerGerd Moellmann <gerd@gnu.org>2001-10-06 23:44:55 +0000
commit29d823d63dae336af7de8546835f88d83f18089e (patch)
tree38d562e399c650e859ab8ca3ab537e4004cbe71e
parentf8edfd760d1cfb8c5c3273ad33ebc5f82b01db49 (diff)
downloademacs-29d823d63dae336af7de8546835f88d83f18089e.tar.gz
(FLOAT_TO_INT2, FLOAT_TO_INT): Use FIXNUM_OVERFLOW_P.
-rw-r--r--src/floatfns.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/floatfns.c b/src/floatfns.c
index db1c3a7231e..926235f5fe2 100644
--- a/src/floatfns.c
+++ b/src/floatfns.c
@@ -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)); \
} \