[rucksack-cvs] CVS rucksack

charmon charmon at common-lisp.net
Tue Jan 16 08:31:49 UTC 2007


Update of /project/rucksack/cvsroot/rucksack
In directory clnet:/tmp/cvs-serv21121

Modified Files:
	mop.lisp rucksack.asd 
Log Message:
rucksack 0.1.1
 * propogate unique fropm the direct slot-definition(s) to the
   effective slot definition


--- /project/rucksack/cvsroot/rucksack/mop.lisp	2006/09/04 12:34:34	1.11
+++ /project/rucksack/cvsroot/rucksack/mop.lisp	2007/01/16 08:31:49	1.12
@@ -1,4 +1,4 @@
-;; $Id: mop.lisp,v 1.11 2006/09/04 12:34:34 alemmens Exp $
+;; $Id: mop.lisp,v 1.12 2007/01/16 08:31:49 charmon Exp $
 
 (in-package :rucksack)
 
@@ -250,6 +250,17 @@
              (setf (slot-value effective-slotdef 'index)
                    (slot-index (car index-slotdefs))))))
      
+    ;; If exactly one direct slot is unique, then the effective one is
+    ;; too. If more then one is unique, signal an error.
+    (let ((unique-slotdefs (remove-if-not #'slot-unique persistent-slotdefs)))
+      (cond ((cdr unique-slotdefs)
+             (error "Multiple uniques for slot ~S in ~S:~% ~{~S~^, ~}."
+                    slot-name class
+                    (mapcar #'slot-unique unique-slotdefs)))
+            (unique-slotdefs
+             (setf (slot-value effective-slotdef 'unique)
+                   (slot-unique (car unique-slotdefs))))))
+     
     ;; Return the effective slot definition.
     effective-slotdef))
  
--- /project/rucksack/cvsroot/rucksack/rucksack.asd	2006/05/28 11:18:47	1.2
+++ /project/rucksack/cvsroot/rucksack/rucksack.asd	2007/01/16 08:31:49	1.3
@@ -1,9 +1,9 @@
-;;; $Id: rucksack.asd,v 1.2 2006/05/28 11:18:47 alemmens Exp $
+;;; $Id: rucksack.asd,v 1.3 2007/01/16 08:31:49 charmon Exp $
 
 (in-package :cl-user)
 
 (asdf:defsystem :rucksack
-  :version "0.1"
+  :version "0.1.1"
   :serial t
   :components ((:file "queue")
                (:file "package")




More information about the rucksack-cvs mailing list