summaryrefslogtreecommitdiff
path: root/Lisp/class-definition.lisp
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2008-12-04 21:36:48 +0100
committerMatthias Benkard <code@mail.matthias.benkard.de>2008-12-04 21:36:48 +0100
commitf190cd760eda23428fe3de22f59d72e504acf1c9 (patch)
treee5d5f811c36e9cf3027794fd9564db867f5ecefb /Lisp/class-definition.lisp
parentca929ce0773a8195c3083a5a90322cddc68e2cce (diff)
Properly handle typespec designators in foreign slot definitions.HEADmaster
darcs-hash:9f85e333862e6181f269fa737f65c4b964526311
Diffstat (limited to 'Lisp/class-definition.lisp')
-rw-r--r--Lisp/class-definition.lisp17
1 files changed, 16 insertions, 1 deletions
diff --git a/Lisp/class-definition.lisp b/Lisp/class-definition.lisp
index 1c01a7f..6f89585 100644
--- a/Lisp/class-definition.lisp
+++ b/Lisp/class-definition.lisp
@@ -413,6 +413,21 @@ __define-objective-c-method__"
(mapcar #'(lambda (x)
(getf x :foreign-type))
ivars)))
+ (direct-slots-with-typespecs
+ ;; Convert typespec designators into typespecs.
+ (mapcar #'(lambda (x)
+ (if (or (null (getf x :foreign-type nil))
+ (typespec-p (getf x :foreign-type nil)))
+ x
+ (let ((new-slotd (copy-list x))
+ (designator (getf x :foreign-type)))
+ (setf (getf new-slotd :foreign-type)
+ (list->typespec
+ (if (listp designator)
+ designator
+ (list designator '()))))
+ (print new-slotd))))
+ direct-slots))
(metaclass
(ensure-class (objc-meta-class-name->symbol
(symbol->objc-class-name name))
@@ -424,7 +439,7 @@ __define-objective-c-method__"
(ensure-class (intern (symbol-name name) '#:objective-c-classes)
:metaclass metaclass
:pointer new-class-pointer
- :direct-slots direct-slots
+ :direct-slots direct-slots-with-typespecs
:direct-superclasses direct-superclasses
:direct-default-initargs direct-default-initargs
:new-foreign-class-p t)))