Hi David,

> On 18 Jun 2019, at 16:22, David Chisnall <[email protected]> wrote:
> 
>>> - descriptionForInstanceMethod: is gone.  Don't use it, use the runtime 
>>> functions instead.
>> 
>> Thanks for the hint. 
>> 
>> Where would I find a list (the declaration) of these runtime functions on 
>> MacOSX and GNUstep? Are they even identically named? I guess no!?
>> 
> 
> Here is the top hit for a DDG search for ‘Objective-C Runtime’:
> 
> https://developer.apple.com/documentation/objectivec/objective-c_runtime?language=objc
>  
> <https://developer.apple.com/documentation/objectivec/objective-c_runtime?language=objc>
> 
> It provides you with the Objective-C Runtime API Reference.  The GNUstep 
> runtime also implements this interface and is source compatible

That’s great! 

> (it also implements some non-portable functions, which I would suggest that 
> you avoid).  You can find these all in objc/runtime.h.  
> 
> The method that you are probably looking for is protocol_getMethodDescription.

I wonder why I haven’t found that. Thanks!

         struct objc_method_description methodDesc = 
protocol_getMethodDescription(_protocol, aSelector, YES, YES);
         types = methodDesc.types;            

 This works great as long as I build with -m32. But as soon as I switch to 

...
ADDITIONAL_OBJCFLAGS += -m64 -Wno-deprecated-declarations -Wno-deprecated 
-Wno-format-security
ADDITIONAL_CFLAGS += -m64
ADDITIONAL_LDFLAGS += -m64
…

in GNUmakefile I get

 Compiling file SRProxy.m ...                                                   
 ~~                                         ^~~~~~~~~~~~~
                                                    %lu                         
               (unsigned long)
SRProxy.m:425:54: warning: implicit declaration of function 
'protocol_getMethodDescription' is invalid in C99 
[-Wimplicit-function-declaration]
         struct objc_method_description methodDesc = 
protocol_getMethodDescription(_protocol, aSelector, YES, YES);
                                                     ^
SRProxy.m:425:41: error: variable has incomplete type 'struct 
objc_method_description'
         struct objc_method_description methodDesc = 
protocol_getMethodDescription(_protocol, aSelector, YES, YES);
                                        ^
SRProxy.m:425:17: note: forward declaration of 'struct objc_method_description'
         struct objc_method_description methodDesc = 
protocol_getMethodDescription(_protocol, aSelector, YES, YES);
                ^
Any idea why this works for 32bit code only. I am currently trying to build 
this on MacOSX 10.10. MacOSX 10.12 gave the same error!? :-(

Thanks so much,

 Andreas

_______________________________________________
Discuss-gnustep mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to