Update of /project/elephant/cvsroot/elephant/src/contrib/eslick In directory clnet:/tmp/cvs-serv19536/src/contrib/eslick
Modified Files: snapshot-db.lisp Log Message: Error when registering unsupported types
--- /project/elephant/cvsroot/elephant/src/contrib/eslick/snapshot-db.lisp 2007/04/12 17:09:56 1.2 +++ /project/elephant/cvsroot/elephant/src/contrib/eslick/snapshot-db.lisp 2007/04/12 17:16:59 1.3 @@ -10,10 +10,10 @@ ;; ;; Limitations: ;; -;; - Hashes can be registered as indexes of objects. Keys -;; should be simple (numbers, strings, symbols) although -;; arrays in an equalp cache are probably OK too. Values -;; should also be simple or subclasses of standard-object +;; - Hashes can be registered as indexes of objects. Keys should be +;; simple (numbers, strings, symbols) although arrays are probably +;; OK too. Values should also be simple or subclasses of +;; standard-object. ;; ;; - When a snapshot is taken of a hash, all values that are ;; standard objects are registered. Any refs to registered @@ -73,6 +73,9 @@ (cache-snapshot-object id hash set) (values hash id))))
+(defmethod register-object ((default t) (set snapshot-set)) + (error "Cannot register objects of type ~A" (type-of default))) + (defmethod unregister-object (object (set snapshot-set)) "Drops the object from the cache and backing store" (let ((id (gethash object (snapshot-set-cache set))))