Changeset 5026


Ignore:
Timestamp:
12/08/03 14:58:34 (18 years ago)
Author:
piso
Message:

(defstruct slot-definition ...)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/clos.lisp

    r5025 r5026  
    22;;;
    33;;; Copyright (C) 2003 Peter Graves
    4 ;;; $Id: clos.lisp,v 1.11 2003-12-08 14:47:20 piso Exp $
     4;;; $Id: clos.lisp,v 1.12 2003-12-08 14:58:34 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    153153;;; Slot definition metaobjects
    154154
    155 (defun slot-definition-name (slot)
    156   (getf slot ':name))
    157 (defun (setf slot-definition-name) (new-value slot)
    158   (setf (getf* slot ':name) new-value))
    159 
    160 (defun slot-definition-initfunction (slot)
    161   (getf slot ':initfunction))
    162 (defun (setf slot-definition-initfunction) (new-value slot)
    163   (setf (getf* slot ':initfunction) new-value))
    164 
    165 (defun slot-definition-initform (slot)
    166   (getf slot ':initform))
    167 (defun (setf slot-definition-initform) (new-value slot)
    168   (setf (getf* slot ':initform) new-value))
    169 
    170 (defun slot-definition-initargs (slot)
    171   (getf slot ':initargs))
    172 (defun (setf slot-definition-initargs) (new-value slot)
    173   (setf (getf* slot ':initargs) new-value))
    174 
    175 (defun slot-definition-readers (slot)
    176   (getf slot ':readers))
    177 (defun (setf slot-definition-readers) (new-value slot)
    178   (setf (getf* slot ':readers) new-value))
    179 
    180 (defun slot-definition-writers (slot)
    181   (getf slot ':writers))
    182 (defun (setf slot-definition-writers) (new-value slot)
    183   (setf (getf* slot ':writers) new-value))
    184 
    185 (defun slot-definition-allocation (slot)
    186   (getf slot ':allocation))
    187 (defun (setf slot-definition-allocation) (new-value slot)
    188   (setf (getf* slot ':allocation) new-value))
     155(defstruct slot-definition
     156  name
     157  initfunction
     158  initform
     159  initargs
     160  readers
     161  writers
     162  allocation)
    189163
    190164(defun make-direct-slot-definition (&rest properties
     
    197171                                          (allocation :instance)
    198172                                          &allow-other-keys)
    199   (let ((slot (copy-list properties))) ; Don't want to side effect &rest list
     173  (let ((slot (make-slot-definition)))
    200174    (setf (slot-definition-name slot) name)
    201175    (setf (slot-definition-initargs slot) initargs)
     
    214188                                             (allocation :instance)
    215189                                             &allow-other-keys)
    216   (let ((slot (copy-list properties)))  ; Don't want to side effect &rest list
     190  (let ((slot (make-slot-definition)))
    217191    (setf (slot-definition-name slot) name)
    218192    (setf (slot-definition-initargs slot) initargs)
Note: See TracChangeset for help on using the changeset viewer.