X-Git-Url: http://git.kpe.io/?p=kmrcl.git;a=blobdiff_plain;f=attrib-class.lisp;h=378bae0f6fb832cfde0376b0985d81b331287aa5;hp=a76e9913ad3e7092a11b5fac05548d99c06592f1;hb=526eef1b59e071cbb4ecd35f73a14c1a3f8e32b6;hpb=e8c34efef61039ff3319203710b533be1a7906ca diff --git a/attrib-class.lisp b/attrib-class.lisp index a76e991..378bae0 100644 --- a/attrib-class.lisp +++ b/attrib-class.lisp @@ -1,4 +1,4 @@ -;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- +;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10; Package: kmrcl-*- ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; @@ -7,9 +7,9 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Apr 2000 ;;;; -;;;; $Id: attrib-class.lisp,v 1.15 2003/06/25 18:08:09 kevin Exp $ +;;;; $Id$ ;;;; -;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg +;;;; This file, part of KMRCL, is Copyright (c) 2002-2003 by Kevin M. Rosenberg ;;;; ;;;; KMRCL users are granted the rights to distribute and use this software ;;;; as governed by the terms of the Lisp Lesser GNU Public License @@ -50,13 +50,15 @@ on example from AMOP")) (declare (ignore initargs)) (kmr-mop:find-class 'attributes-esd)) -(defmethod kmr-mop:compute-effective-slot-definition :around +(defmethod kmr-mop:compute-effective-slot-definition ((cl attributes-class) #+kmr-normal-cesd name dsds) #+kmr-normal-cesd (declare (ignore name)) (let ((esd (call-next-method))) (setf (esd-attributes esd) (remove-duplicates (mapappend #'dsd-attributes dsds))) esd)) +;; This does not work in Lispworks prior to version 4.3 + (defmethod kmr-mop:compute-slots ((class attributes-class)) (let* ((normal-slots (call-next-method)) (alist (mapcar @@ -65,18 +67,16 @@ on example from AMOP")) (mapcar #'(lambda (attr) (list attr)) (esd-attributes slot)))) normal-slots))) - (cons (make-instance 'attributes-esd - :name 'all-attributes - :initform `',alist - :initfunction #'(lambda () alist) - :allocation :instance - :class class - :documentation "" - :type t - ;; This is an attempted work-around -- lispworks doesn't work - ;; it appears to setup storage someplace - ;; #+lispworks :location #+lispworks (length normal-slots) - ) + + (cons (make-instance + 'attributes-esd + :name 'all-attributes + :initform `',alist + :initfunction #'(lambda () alist) + :allocation :instance + :documentation "Attribute bucket" + :type t + ) normal-slots))) (defun slot-attribute (instance slot-name attribute)