chiark / gitweb /
src/c-types-class-impl.lisp (find-class-type): Don't repeat type name.
[sod] / src / class-layout-proto.lisp
index 0803b1842a6162d051a7db98dc059179b7aa259a..927700f24b71075664af2ee8b3d424e86260da8a 100644 (file)
@@ -31,10 +31,12 @@ (cl:in-package #:sod)
 (export '(effective-slot effective-slot-class
          effective-slot-direct-slot effective-slot-initializer))
 (defclass effective-slot ()
-  ((%class :initarg :class :type sod-slot :reader effective-slot-class)
+  ((%class :initarg :class :type sod-class :reader effective-slot-class)
    (slot :initarg :slot :type sod-slot :reader effective-slot-direct-slot)
    (initializer :initarg :initializer :type (or sod-initializer null)
-               :reader effective-slot-initializer))
+               :reader effective-slot-initializer)
+   (initargs :initarg :initargs :initform nil
+            :type list :reader effective-slot-initargs))
   (:documentation
    "Describes a slot and how it's meant to be initialized.
 
@@ -50,6 +52,14 @@ (defgeneric find-slot-initializer (class slot)
   (:documentation
    "Return the most specific initializer for SLOT, starting from CLASS."))
 
+(export 'find-slot-initargs)
+(defgeneric find-slot-initargs (class slot)
+  (:documentation
+   "Return as a list all of the initargs defined on CLASS to initialize SLOT.
+
+   The list is returned with initargs defined on more specific classes
+   first."))
+
 (export 'compute-effective-slot)
 (defgeneric compute-effective-slot (class slot)
   (:documentation