summaryrefslogtreecommitdiff
path: root/Lisp/method-invocation.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'Lisp/method-invocation.lisp')
-rw-r--r--Lisp/method-invocation.lisp8
1 files changed, 6 insertions, 2 deletions
diff --git a/Lisp/method-invocation.lisp b/Lisp/method-invocation.lisp
index b260f2a..c95a43c 100644
--- a/Lisp/method-invocation.lisp
+++ b/Lisp/method-invocation.lisp
@@ -140,7 +140,9 @@ easier to use with __apply__.
__invoke__"
;; TODO: Support varargs.
- (let* ((selector (selector method-name))
+ (let* ((selector (if (typep method-name 'selector)
+ method-name
+ (find-selector method-name)))
(class (object-get-class receiver)))
(multiple-value-bind (argc
method-return-typestring
@@ -189,7 +191,9 @@ easier to use with __apply__.
(return-c-type (case return-type
((id objc-class exception selector) :pointer)
(otherwise return-type)))
- (selector (selector method-name)))
+ (selector (if (typep method-name 'selector)
+ method-name
+ (find-selector method-name))))
(labels ((alloc-string-and-register (string)
(register-temporary-string
(cffi:foreign-string-alloc string))))