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: Thu, 14 Jun 2001 10:41:21 -0700

CVSROOT:        /cvs
Module name:    guile
Changes by:     Marius Vollmer <address@hidden> 01/06/14 10:41:21

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

Log message:
        (SCM_SRS): Cast shiftee to scm_signed_bits_t.
        (SCM_INUM): Cast result to scm_signed_bits_t.

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

Patches:
Index: guile/guile-core/libguile/numbers.h
diff -u guile/guile-core/libguile/numbers.h:1.51 
guile/guile-core/libguile/numbers.h:1.52
--- guile/guile-core/libguile/numbers.h:1.51    Sat May 26 13:51:20 2001
+++ guile/guile-core/libguile/numbers.h Thu Jun 14 10:41:21 2001
@@ -69,7 +69,7 @@
 
 /* SCM_SRS is signed right shift */
 #if (-1 == (((-1) << 2) + 2) >> 2)
-# define SCM_SRS(x, y) ((x) >> (y))
+# define SCM_SRS(x, y) ((scm_signed_bits_t)(x) >> (y))
 #else
 # define SCM_SRS(x, y) ((SCM_UNPACK (x) < 0) ? ~((~SCM_UNPACK (x)) >> (y)) : 
(SCM_UNPACK (x) >> (y)))
 #endif /* (-1 == (((-1) << 2) + 2) >> 2) */
@@ -78,7 +78,7 @@
 #define SCM_INUMP(x)   (2 & SCM_UNPACK (x))
 #define SCM_NINUMP(x)  (!SCM_INUMP (x))
 #define SCM_MAKINUM(x)  (SCM_PACK (((x) << 2) + 2L))
-#define SCM_INUM(x)     (SCM_SRS (SCM_UNPACK (x), 2))
+#define SCM_INUM(x)     ((scm_signed_bits_t)(SCM_SRS (SCM_UNPACK (x), 2)))
 
 
 /* SCM_FIXABLE is true if its long argument can be encoded in an SCM_INUM. */



reply via email to

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