From 909b52ce5a0c7a9beca639b830f5f57380af64ff Mon Sep 17 00:00:00 2001
From: Matthias Benkard <code@mail.matthias.benkard.de>
Date: Mon, 17 Sep 2007 23:29:48 +0200
Subject: LOW-LEVEL-INVOKE: Support selectors as arguments.

darcs-hash:0dc99e4177c665793fe10972f86d6f5f1507c742
---
 Lisp/method-invocation.lisp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'Lisp')

diff --git a/Lisp/method-invocation.lisp b/Lisp/method-invocation.lisp
index d851f63..40d1d5d 100644
--- a/Lisp/method-invocation.lisp
+++ b/Lisp/method-invocation.lisp
@@ -303,7 +303,7 @@ Returns: *result* --- the return value of the method invocation.
 
 (defun typespec->c-type (typespec)
   (case (car typespec)
-    ((:pointer struct union id objc-class exception array) :pointer)
+    ((:pointer struct union id objc-class exception array selector) :pointer)
     ((:string) :string)
     (otherwise (car typespec))))
 
@@ -345,6 +345,9 @@ Returns: *result* --- the return value of the method invocation.
                       (setf (argref :pointer i) arg))
                      ((id objc-class exception)
                       (setf (argref :pointer i) (pointer-to arg)))
+                     ((selector)
+                      (ctypecase arg
+                        (selector (setf (argref :pointer i) (pointer-to arg)))))
                      (:string
                       (setf (argref :string i)
                             (alloc-string-and-register arg)))
-- 
cgit v1.2.3