[elephant-cvs] CVS elephant/src/elephant

ieslick ieslick at common-lisp.net
Mon Feb 5 19:33:11 UTC 2007


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

Modified Files:
	serializer2.lisp 
Log Message:
Integrated Henrik's changes, except for the sbcl/%bignum-ref in serializer2.lisp which I believed we fixed by importing it from :sb-bignum

--- /project/elephant/cvsroot/elephant/src/elephant/serializer2.lisp	2007/02/05 17:22:57	1.17
+++ /project/elephant/cvsroot/elephant/src/elephant/serializer2.lisp	2007/02/05 19:33:11	1.18
@@ -152,8 +152,9 @@
 ;; SERIALIZER
 ;;
 
-(defconstant +2^32+ 4294967296)
-(defconstant +2^64+ 18446744073709551616)
+(defconstant +2^31+ (expt 2 31))
+(defconstant +2^32+ (expt 2 32))
+(defconstant +2^64+ (expt 2 64))
 
 (defun serialize (frob bs sc)
   "Serialize a lisp value into a buffer-stream."
@@ -173,7 +174,7 @@
 		    (buffer-write-int32 frob bs))
 		  (progn
 		    (assert (< #.most-positive-fixnum +2^64+))
-		    (if (< frob +2^32+)
+		    (if (< (abs frob) +2^32+)
 			(progn
 			  (buffer-write-byte +fixnum32+ bs)
 			  (buffer-write-int32 frob bs))




More information about the Elephant-cvs mailing list