[elephant-cvs] CVS elephant/src/elephant
ieslick
ieslick at common-lisp.net
Tue Apr 24 16:39:31 UTC 2007
Update of /project/elephant/cvsroot/elephant/src/elephant
In directory clnet:/tmp/cvs-serv14475/src/elephant
Modified Files:
classes.lisp
Log Message:
Handle error conditions in change-class protocol; more docs
--- /project/elephant/cvsroot/elephant/src/elephant/classes.lisp 2007/04/24 03:02:27 1.30
+++ /project/elephant/cvsroot/elephant/src/elephant/classes.lisp 2007/04/24 16:39:30 1.31
@@ -177,13 +177,20 @@
(old-persistent-slots class))))
;; Update new persistent slots, the others we get for free (same oid!)
;; Isn't this done by the default call-next-method?
- (apply #'shared-initialize instance new-persistent-slots initargs))
+ (apply #'shared-initialize instance new-persistent-slots initargs)
+ )
))
;;
;; CLASS CHANGE PROTOCOL
;;
+(defmethod change-class ((inst persistent) (class t) &rest rest)
+ (error "Changing a persistent instance's class to a non-persistent class is not currently allowed"))
+
+(defmethod change-class ((inst standard-object) (class persistent-metaclass) &rest rest)
+ (error "Changing a standard instance to a persistent instance is not supported"))
+
(defmethod update-instance-for-different-class :around ((previous persistent) (current persistent) &rest initargs &key)
(let* ((old-class (class-of previous))
(new-class (class-of current))
More information about the Elephant-cvs
mailing list