changeset 39638:911382113c16

(FLOAT_TO_INT2, FLOAT_TO_INT): Use FIXNUM_OVERFLOW_P.
author Gerd Moellmann <gerd@gnu.org>
date Sat, 06 Oct 2001 23:44:55 +0000
parents 670f23724a65
children f5ac153e5b5c
files src/floatfns.c
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/floatfns.c	Sat Oct 06 23:41:39 2001 +0000
+++ b/src/floatfns.c	Sat Oct 06 23:44:55 2001 +0000
@@ -183,8 +183,7 @@
 #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 @@
 #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));					\
     }									\