[cl-store-devel] Serializing structure instances with Allegro CL

Jason S. Cornez jcornez at ravenpack.com
Mon Mar 15 11:54:41 UTC 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The doc and code for cl-store claim that Allegro CL structure instances
cannot be stored.  But enabling the functionality seems to work just
fine with current versions of Allegro CL, 8.1 and 8.2.  The patch is
just the obvious changes and it is included below.

Thanks,
- -Jason

$ git diff -p -w
diff --git a/world/site/cl-store-darcs/acl/custom.lisp
b/world/site/cl-store-darcs/acl/custom.lisp
index 9f11bd2..fdb75f0 100644
- --- a/world/site/cl-store-darcs/acl/custom.lisp
+++ b/world/site/cl-store-darcs/acl/custom.lisp
@@ -26,4 +26,11 @@
                   (double-float-values)
                   (long-float-values)))))

+(defstore-cl-store (obj structure-object stream)
+  (output-type-code +structure-object-code+ stream)
+  (store-type-object obj stream))
+
+(defrestore-cl-store (structure-object stream)
+  (restore-type-object stream))
+
 ;; EOF
diff --git a/world/site/cl-store-darcs/allegrocl/custom.lisp
b/world/site/cl-store-darcs/allegrocl/custom.lisp
index daa29eb..4896a2d 100644
- --- a/world/site/cl-store-darcs/allegrocl/custom.lisp
+++ b/world/site/cl-store-darcs/allegrocl/custom.lisp
@@ -26,4 +26,11 @@
                   (double-float-values)
                   (long-float-values)))))

+(defstore-cl-store (obj structure-object stream)
+  (output-type-code +structure-object-code+ stream)
+  (store-type-object obj stream))
+
+(defrestore-cl-store (structure-object stream)
+  (restore-type-object stream))
+
 ;; EOF
diff --git a/world/site/cl-store-darcs/utils.lisp
b/world/site/cl-store-darcs/utils.lisp
index 0457f60..a2a822b 100644
- --- a/world/site/cl-store-darcs/utils.lisp
+++ b/world/site/cl-store-darcs/utils.lisp
@@ -20,7 +20,7 @@
     and the objects class")
   (:method ((object standard-object))
    (serializable-slots-using-class object (class-of object)))
- -#+(or sbcl cmu openmcl)
+#+(or sbcl cmu openmcl allegro)
   (:method ((object structure-object))
    (serializable-slots-using-class object (class-of object)))
   (:method ((object condition))
@@ -35,7 +35,7 @@
    The default calls compute slots with class")
   (:method ((object t) (class standard-class))
    (class-slots class))
- -#+(or sbcl cmu openmcl)
+#+(or sbcl cmu openmcl allegro)
   (:method ((object t) (class structure-class))
    (class-slots class))
 #+sbcl
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkueIAEACgkQQlm6HDTMLyOKsQCg/vK+yD6cp4Bk3EkzmeExfpDr
lbYAn3d6ykCsvTI8BrUBdyRq6AsaDw8G
=2ogX
-----END PGP SIGNATURE-----




More information about the cl-store-devel mailing list