guile-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

guile/guile-core/libguile numbers.h


From: Marius Vollmer
Subject: guile/guile-core/libguile numbers.h
Date: Sat, 06 Oct 2001 15:58:03 -0400

CVSROOT:        /cvs
Module name:    guile
Changes by:     Marius Vollmer <address@hidden> 01/10/06 15:58:02

Modified files:
        guile-core/libguile: numbers.h 

Log message:
        * tags.h (SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
        SCM_T_SIGNED_BITS_MIN): New.
        * numbers.h (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM):
        Use them to make these macros computable by the preprocessor.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/numbers.h.diff?cvsroot=OldCVS&tr1=1.58&tr2=1.59&r1=text&r2=text

Patches:
Index: guile/guile-core/libguile/numbers.h
diff -u guile/guile-core/libguile/numbers.h:1.58 
guile/guile-core/libguile/numbers.h:1.59
--- guile/guile-core/libguile/numbers.h:1.58    Fri Oct  5 13:43:49 2001
+++ guile/guile-core/libguile/numbers.h Sat Oct  6 15:58:02 2001
@@ -55,13 +55,9 @@
  *
  * Inums are exact integer data that fits within an SCM word.  */
 
-#define SCM_I_FIXNUM_BIT \
-  (SCM_LONG_BIT - 2)
-#define SCM_MOST_POSITIVE_FIXNUM \
-  ((((scm_t_signed_bits) 1) << (SCM_I_FIXNUM_BIT - 1)) - 1)
-#define SCM_MOST_NEGATIVE_FIXNUM \
-  (-((scm_t_signed_bits) SCM_MOST_POSITIVE_FIXNUM) - 1)
-
+#define SCM_I_FIXNUM_BIT         (SCM_LONG_BIT - 2)
+#define SCM_MOST_POSITIVE_FIXNUM (SCM_T_SIGNED_BITS_MAX/8-1)
+#define SCM_MOST_NEGATIVE_FIXNUM (-SCM_MOST_POSITIVE_FIXNUM-1)
 
 /* SCM_SRS is signed right shift */
 #if (-1 == (((-1) << 2) + 2) >> 2)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]