summaryrefslogtreecommitdiff
path: root/Lisp
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2008-03-07 00:17:11 +0100
committerMatthias Benkard <code@mail.matthias.benkard.de>2008-03-07 00:17:11 +0100
commit9f42bd09be63cf0b3b92eea7075cf95d2b96eb49 (patch)
tree03b0611e18bed05b37bbccdcd53a962d4279da70 /Lisp
parent9ee2896adde5844a552a54f15ee3e2e8fc45a856 (diff)
Have callbacks properly return pointers to :ID, :CLASS and :SELECTOR values.
darcs-hash:d22c6d2a2f51f9653328a76b1de9059f3a9ff61b
Diffstat (limited to 'Lisp')
-rw-r--r--Lisp/method-definition.lisp26
1 files changed, 15 insertions, 11 deletions
diff --git a/Lisp/method-definition.lisp b/Lisp/method-definition.lisp
index 38bc702..f057244 100644
--- a/Lisp/method-definition.lisp
+++ b/Lisp/method-definition.lisp
@@ -424,17 +424,21 @@ __define-objective-c-generic-function__.
,@arguments))
(format t "~&~A" (list ,@arg-symbols)))
(unwind-protect
- (coerce-object
- (,(generic-function-name gf)
- ;; Pass the class this method is
- ;; being defined for as the first
- ;; argument. This is needed so that
- ;; super calls can work.
- ',(class-name class)
- ;; Leave the second argument (the
- ;; selector) out.
- ,@(list* (car arguments) (cddr arguments)))
- ',return-type)
+ (,(if (member (typespec-primary-type return-type)
+ '(:id :class :selector))
+ 'pointer
+ 'progn)
+ (coerce-object
+ (,(generic-function-name gf)
+ ;; Pass the class this method is
+ ;; being defined for as the first
+ ;; argument. This is needed so that
+ ;; super calls can work.
+ ',(class-name class)
+ ;; Leave the second argument (the
+ ;; selector) out.
+ ,@(list* (car arguments) (cddr arguments)))
+ ',return-type))
;; FIXME: We may want to wrap signalled
;; SERIOUS-CONDITIONS in some kind of
;; Objective-C exception object and put