|
From: | Andreas Höschler |
Subject: | Porting to 64Bit -descriptionForInstanceMethod: |
Date: | Tue, 18 Jun 2019 13:59:55 +0200 |
Hi all, this is probably only partially GNUstep related but anyway. I have just started to port my code - which builds fine [using GNUstep make] on current GNUstep and all MacOSX versions I have here - to 64Bit. For that I opened the GNUMakefile and replaced ADDITIONAL_OBJCFLAGS += -m32 -Wno-deprecated-declarations -Wno-deprecated -Wno-format-security ADDITIONAL_CFLAGS += -m32 ADDITIONAL_LDFLAGS += -m32 with ADDITIONAL_OBJCFLAGS += -m64 -Wno-deprecated-declarations -Wno-deprecated -Wno-format-security ADDITIONAL_CFLAGS += -m64 ADDITIONAL_LDFLAGS += -m64 When compiling Protocol *_protocol = …; char *types = NULL; types = [_protocol descriptionForInstanceMethod:aSelector]->types; // -m32 delivers objc_method_description*, -m64 delivers objc_object* I get 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' It seems that once we switch to 64Bit descriptionForInstanceMethod: to no longer delivers a struct objc_method_description as it used to do but now a struct objc_object which seems completely wrong!?? Am I supposed to encountered that kind of difficulties when going to 64Bit in 2019? I thought I was the last one running 32Bit code!? On GNUstep I use struct objc_method_description desc; desc = GSProtocolGetMethodDescriptionRecursive(_protocol, aSelector, YES, YES); if (desc.name == NULL && desc.types == NULL) { desc = GSProtocolGetMethodDescriptionRecursive(_protocol, aSelector, YES, NO); } types = desc.types; for getting the types. I haven’t tried that with -m64 yet. Any idea what this is all about and how to fix it? Thanks a lot, Andreas |
[Prev in Thread] | Current Thread | [Next in Thread] |