From edd93c244d8e689ce32fa5b77a917dc7fd082561 Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Wed, 19 Mar 2008 14:20:28 +0100 Subject: Fix method invocation on Mac OS X. darcs-hash:389135940affce22558648db2fd7e25cebc551bd --- Lisp/method-invocation.lisp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'Lisp') diff --git a/Lisp/method-invocation.lisp b/Lisp/method-invocation.lisp index 29ad3c6..4a3c209 100644 --- a/Lisp/method-invocation.lisp +++ b/Lisp/method-invocation.lisp @@ -296,19 +296,18 @@ easier to use with __apply__. &aux (class-ptr (%objcl-object-get-class (pointer receiver)))) (cons (cffi:pointer-address class-ptr) (cffi:pointer-address (pointer-to selector))) - (let* ((class (object-get-class receiver)) - (signature + (let* ((signature (objc-or (if (object-is-class-p receiver) - (primitive-invoke class + (primitive-invoke receiver "methodSignatureForSelector:" 'id selector) - (primitive-invoke class + (primitive-invoke (object-get-class receiver) "instanceMethodSignatureForSelector:" 'id selector)) (error (make-condition 'message-not-understood - :class class + :class (object-get-class receiver) :selector selector)))) (argc (primitive-invoke signature "numberOfArguments" :unsigned-int)) (method-return-typestring (primitive-invoke signature -- cgit v1.2.3