r4628: Auto commit for Debian build
authorKevin M. Rosenberg <kevin@rosenberg.net>
Fri, 25 Apr 2003 03:34:10 +0000 (03:34 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Fri, 25 Apr 2003 03:34:10 +0000 (03:34 +0000)
rules.lisp

index bf6105cf3361a4c203a60c83704c144eb80ede56..f2684c33bae09e562e9c4d9a8ed6cc0d6c9430c6 100644 (file)
@@ -7,7 +7,7 @@
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Apr 2000
 ;;;;
-;;;; $Id: rules.lisp,v 1.31 2003/04/24 20:30:11 kevin Exp $
+;;;; $Id: rules.lisp,v 1.32 2003/04/25 03:34:10 kevin Exp $
 ;;;;
 ;;;; This file is Copyright (c) 2000-2002 by Kevin M. Rosenberg
 ;;;;
   #+ignore
   (cmsg-c :verbose "Setf slot value: class: ~s, obj: ~s, slot: ~s, value: ~s" cl (class-of obj) slot new-value)
   
-  (let ((func (esd-value-constraint slot)))
+  (let ((func (when (slot-boundp slot 'value-constraint)
+               (esd-value-constraint slot))))
     (cond
       ((and func (not (funcall func new-value)))
        (warn "Rejected change to value of slot ~a of object ~a"
             (slot-definition-name slot) obj)
-       (values (slot-value obj (slot-definition-name slot)) nil)
+       (slot-value obj (slot-definition-name slot)))
       (t
-       (values new-value t))))))
+       (prog1
+          (call-next-method)
+        (when (direct-rules cl)
+          (fire-class-rules cl obj slot)))))))
 
 
 (defmethod (setf slot-value-using-class) :around 
     (new-value (cl hyperobject-class) obj (slot hyperobject-esd))
-  (multiple-value-bind (value changed-p) (do-svuc new-value cl obj slot)
-    (when changed-p
-      (setq value (call-next-method))
-      (when (direct-rules cl)
-       (fire-class-rules cl obj slot)))
-    value))
-    
+  (do-svuc new-value cl obj slot))
 
 
 #+ignore