discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Porting to 64Bit -descriptionForInstanceMethod:


From: David Chisnall
Subject: Re: Porting to 64Bit -descriptionForInstanceMethod:
Date: Tue, 18 Jun 2019 13:12:07 +0100
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0

Wow, this is really old code!

On 18/06/2019 12:59, Andreas Höschler wrote:
*SRProxy.m:419:29: **warning: **instance method '-descriptionForInstanceMethod:' not found (return type defaults to 'id') [-Wobjc-method-access]*          types = [_protocol descriptionForInstanceMethod:aSelector]->types;
*                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~*
*/usr/include/objc/Protocol.h:45:12: note: *receiver is instance of class declared here
@interface Protocol : NSObject
*           ^*
*SRProxy.m:419:70: **error: **no member named 'types' in 'struct objc_object'*
*
*

With the 'Modern' Objective-C ABI (circa 2006) on Apple platforms, the only option on 64-bit and the default for a very long time on 32-bit, Protocol no longer has any methods exposed on it. This means:

- descriptionForInstanceMethod: is gone. Don't use it, use the runtime functions instead. There is no point paying the overhead of an Objective-C message send for a function where all of the types are known at compile time.

- The compiler assumes that the nonexistent method -descriptionForInstanceMethod: returns id, which is a typedef for struct objc_object, which has no fields other than isa (probably not even isa, because direct access to isa is also deprecated).

David



reply via email to

[Prev in Thread] Current Thread [Next in Thread]