[elephant-cvs] CVS elephant/src/elephant

ieslick ieslick at common-lisp.net
Mon Feb 12 20:46:25 UTC 2007


Update of /project/elephant/cvsroot/elephant/src/elephant
In directory clnet:/tmp/cvs-serv7686/src/elephant

Modified Files:
	serializer2.lisp 
Log Message:
Slight tweak to accomodate Henrik's observation about fixnums being signed

--- /project/elephant/cvsroot/elephant/src/elephant/serializer2.lisp	2007/02/12 20:36:46	1.21
+++ /project/elephant/cvsroot/elephant/src/elephant/serializer2.lisp	2007/02/12 20:46:25	1.22
@@ -151,6 +151,7 @@
 
 (defconstant +2^31+ (expt 2 31))
 (defconstant +2^32+ (expt 2 32))
+(defconstant +2^63+ (expt 2 63))
 (defconstant +2^64+ (expt 2 64))
 
 (defun serialize (frob bs sc)
@@ -165,12 +166,12 @@
 	 (%serialize (frob)
 	   (etypecase frob
 	     (fixnum 
-	      (if (< #.most-positive-fixnum +2^32+) ;; should be compiled away
+	      (if (< #.most-positive-fixnum +2^31+) ;; should be compiled away
 		  (progn
 		    (buffer-write-byte +fixnum32+ bs)
 		    (buffer-write-int32 frob bs))
 		  (progn
-		    (assert (< #.most-positive-fixnum +2^64+))
+		    (assert (< #.most-positive-fixnum +2^63+))
 		    (if (< (abs frob) +2^31+)
 			(progn
 			  (buffer-write-byte +fixnum32+ bs)




More information about the Elephant-cvs mailing list