summaryrefslogtreecommitdiff
path: root/Lisp/method-invocation.lisp
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2008-02-14 22:02:21 +0100
committerMatthias Benkard <code@mail.matthias.benkard.de>2008-02-14 22:02:21 +0100
commit8c5f730bddb827eaca240ed97bf396250caee30c (patch)
tree5a62168cd2daa60e87fa57e19e6cfa9dce29b5a9 /Lisp/method-invocation.lisp
parent8d87e7250e5046e771a8383098032290c9a2f9b1 (diff)
Simplify the type handling API.
darcs-hash:9e2c0c2caf9589869f7894c3522a776748df38fd
Diffstat (limited to 'Lisp/method-invocation.lisp')
-rw-r--r--Lisp/method-invocation.lisp19
1 files changed, 6 insertions, 13 deletions
diff --git a/Lisp/method-invocation.lisp b/Lisp/method-invocation.lisp
index c0e44ac..2389a9f 100644
--- a/Lisp/method-invocation.lisp
+++ b/Lisp/method-invocation.lisp
@@ -309,12 +309,12 @@ easier to use with __apply__.
(defun typespec->c-type (typespec)
- (case (car typespec)
+ (case (typespec-primary-type typespec)
((:pointer pointer struct union id objective-c-class exception array
selector)
:pointer)
((:string) :string)
- (otherwise (car typespec))))
+ (otherwise (typespec-primary-type typespec))))
(defun low-level-invoke (receiver selector return-typestring return-type
@@ -428,22 +428,15 @@ easier to use with __apply__.
objc-arg-ptrs)))
(unless (cffi:null-pointer-p error-cell)
(error (make-condition 'exception :pointer error-cell)))
- (case (let ((nominal-type (find-if #'(lambda (x)
- (and (consp x)
- (eq (car x) 'nominally)))
- (cadr return-type))))
- ;; Do the modifiers include something like
- ;; (NOMINALLY :UNSIGNED-CHAR)?
- (if nominal-type
- (cadr nominal-type)
- (car return-type)))
+ (case (or (typespec-nominal-type return-type)
+ (typespec-primary-type return-type))
((id objective-c-class exception selector)
(let ((*skip-retaining*
(or *skip-retaining*
(constructor-name-p (selector-name selector)))))
(make-pointer-wrapper (car return-type)
- :pointer (cffi:mem-ref objc-return-value-cell
- return-c-type))))
+ :pointer (cffi:mem-ref objc-return-value-cell
+ return-c-type))))
((:char :unsigned-char)
;; FIXME: This is non-trivial. See policy.lisp for
;; details.