[cl-store-cvs] CVS update: cl-store/ChangeLog cl-store/backends.lisp cl-store/circularities.lisp cl-store/cl-store.asd cl-store/default-backend.lisp cl-store/plumbing.lisp cl-store/tests.lisp

Sean Ross sross at common-lisp.net
Wed Mar 23 12:58:47 UTC 2005


Update of /project/cl-store/cvsroot/cl-store
In directory common-lisp.net:/tmp/cvs-serv19156

Modified Files:
	ChangeLog backends.lisp circularities.lisp cl-store.asd 
	default-backend.lisp plumbing.lisp tests.lisp 
Log Message:
Changelog 2005-03-23
Date: Wed Mar 23 13:58:43 2005
Author: sross

Index: cl-store/ChangeLog
diff -u cl-store/ChangeLog:1.27 cl-store/ChangeLog:1.28
--- cl-store/ChangeLog:1.27	Thu Mar 17 13:07:58 2005
+++ cl-store/ChangeLog	Wed Mar 23 13:58:43 2005
@@ -1,6 +1,12 @@
+2005-03-23 Sean Ross <sross at common-lisp.net>
+	* backends.lisp: Fix up for type specifications
+	for the old-magic-numbers and stream-type slots
+	for class backend.
+	* circularities.lisp: Changed *store-hash-size* and
+	*restore-hash-size* to more reasonable values (50).
+	
 2005-03-17 Sean Ross <sross at common-lisp.net>
-	* doc/cl-store.texi: Fixed up to work 
-	properly with makeinfo.
+	* doc/cl-store.texi: Fixed up to work properly with makeinfo.
 	
 2005-03-15 Sean Ross <sross at common-lisp.net>
 	* default-backend.lisp, utils.lisp: Changed reference


Index: cl-store/backends.lisp
diff -u cl-store/backends.lisp:1.8 cl-store/backends.lisp:1.9
--- cl-store/backends.lisp:1.8	Fri Feb 11 13:00:31 2005
+++ cl-store/backends.lisp	Wed Mar 23 13:58:43 2005
@@ -15,8 +15,8 @@
   ((name :accessor name :initform "Unknown" :initarg :name :type symbol)
    (magic-number :accessor magic-number :initarg :magic-number :type integer)
    (old-magic-numbers :accessor old-magic-numbers :initarg :old-magic-numbers
-                      :type integer)
-   (stream-type :accessor stream-type :initarg :stream-type :type symbol
+                      :type cons)
+   (stream-type :accessor stream-type :initarg :stream-type :type (or symbol cons)
                 :initform (required-arg "stream-type")))
   (:documentation "Core class which custom backends must extend"))
 


Index: cl-store/circularities.lisp
diff -u cl-store/circularities.lisp:1.17 cl-store/circularities.lisp:1.18
--- cl-store/circularities.lisp:1.17	Thu Mar 17 13:07:58 2005
+++ cl-store/circularities.lisp	Wed Mar 23 13:58:43 2005
@@ -92,7 +92,7 @@
 (defvar *stored-counter*)
 (defvar *stored-values*)
 
-(defvar *store-hash-size* 20)
+(defvar *store-hash-size* 50)
 
 
 (defmethod backend-store ((backend resolving-backend) (place stream) (obj t))
@@ -148,7 +148,7 @@
 (defvar *restore-counter*)
 (defvar *need-to-fix*)
 (defvar *restored-values*)
-(defvar *restore-hash-size* 20)
+(defvar *restore-hash-size* 50)
 
 (defmethod backend-restore ((backend resolving-backend) (place stream))
   "Restore an object from PLACE using BACKEND. Does the setup for 


Index: cl-store/cl-store.asd
diff -u cl-store/cl-store.asd:1.25 cl-store/cl-store.asd:1.26
--- cl-store/cl-store.asd:1.25	Tue Mar 15 10:59:39 2005
+++ cl-store/cl-store.asd	Wed Mar 23 13:58:43 2005
@@ -40,7 +40,7 @@
   :name "CL-STORE"
   :author "Sean Ross <sdr at jhb.ucs.co.za>"
   :maintainer "Sean Ross <sdr at jhb.ucs.co.za>"
-  :version "0.5.2"
+  :version "0.5.4"
   :description "Serialization package"
   :long-description "Portable CL Package to serialize data types"
   :licence "MIT"


Index: cl-store/default-backend.lisp
diff -u cl-store/default-backend.lisp:1.24 cl-store/default-backend.lisp:1.25
--- cl-store/default-backend.lisp:1.24	Tue Mar 15 10:59:39 2005
+++ cl-store/default-backend.lisp	Wed Mar 23 13:58:43 2005
@@ -483,11 +483,11 @@
          (res (make-array size)))
     (declare (type array-size size))
     (resolving-object (obj res)
-      (loop for i from 0 to (1- size) do
-            ;; we need to copy the index so that
-            ;; it's value is preserved for after the loop.
-            (let ((x i)) 
-              (setting (aref obj x) (restore-object stream)))))
+      (dotimes (i size)
+        ;; we need to copy the index so that
+        ;; it's value at this time is preserved.
+        (let ((x i)) 
+          (setting (aref obj x) (restore-object stream)))))
     res))
 
 ;; Dumping (unsigned-byte 32) for each character seems
@@ -497,6 +497,7 @@
   "Largest character that can be represented in 8 bits")
 
 (defun unicode-string-p (string)
+  "An implementation specific test for a unicode string."
   #+lispworks (typep string 'lw:16-bit-string)
   #+cmu nil
   #-(or lispworks cmu) (some #'(lambda (x) (char> x *char-marker*)) string))


Index: cl-store/plumbing.lisp
diff -u cl-store/plumbing.lisp:1.12 cl-store/plumbing.lisp:1.13
--- cl-store/plumbing.lisp:1.12	Fri Feb 18 12:11:00 2005
+++ cl-store/plumbing.lisp	Wed Mar 23 13:58:43 2005
@@ -160,11 +160,6 @@
     (with-open-file (s place :element-type element-type :direction :input)
       (backend-restore backend s))))
      
-(defclass values-object ()
-  ((vals :accessor vals :initarg :vals))
-  (:documentation "Backends supporting multiple return values
-should define a custom storer and restorer for this class"));
-
 (defun (setf restore) (new-val place)
   (store new-val place))
 
@@ -177,7 +172,7 @@
           (declare (type ub32 val))
           (cond ((= val magic-number) nil)
                 ((member val (old-magic-numbers backend) :test #'=)
-                 (restore-error "Stream contains an object stored with a ~
+                 (restore-error "Stream contains an object stored with an ~
 incompatible version of backend ~A." (name backend)))
                 (t (restore-error "Stream does not contain a stored object~
  for backend ~A."


Index: cl-store/tests.lisp
diff -u cl-store/tests.lisp:1.17 cl-store/tests.lisp:1.18
--- cl-store/tests.lisp:1.17	Tue Mar 15 10:59:39 2005
+++ cl-store/tests.lisp	Wed Mar 23 13:58:43 2005
@@ -159,6 +159,13 @@
 (deftestit symbol.4  'cl-store-tests::foo)
 (deftestit symbol.5  'make-hash-table)
 
+(deftest gensym.1 (progn
+                    (store (gensym "Foobar") *test-file*)
+                    (let ((new (restore *test-file*)))
+                      (list (symbol-package new)
+                            (mismatch "Foobar" (symbol-name new)))))
+         (nil 6))
+
 
 ;; cons
 
@@ -210,7 +217,7 @@
                 (make-array 1 :initial-element (find-symbol "BAR" "FOO")))))
 
 ; unfortunately it's difficult to portably test the internal symbols
-; in a package so we just have to assume that it's OK.
+; in a package so we just assume that it's OK.
 (deftest package.2 
          (package-restores)
          ("FOO" ("COMMON-LISP") ("FOOBAR") t t))




More information about the Cl-store-cvs mailing list