Multiple declarations of objc_msgSend_stret
Multiple declarations of objc_msgSend_stret
- Subject: Multiple declarations of objc_msgSend_stret
- From: Jeff Kelley <email@hidden>
- Date: Thu, 3 Feb 2011 21:18:44 -0500
I’m trying to use objc_msgSend_stret to call -bounds on a UIScreen. I have the following code:
> SEL bounds = NSSelectorFromString(@"bounds");
> CGRect screenBounds;
> objc_msgSend_stret((void *)&screenBounds, screen, bounds);
The declaration of objc_msgSend_stret in the Xcode code sense pop-up is as follows:
> void objc_msgSend_stret(void * stretAddr, id self, SEL op, ...);
But that’s not what message.h would leave me to believe (with some unrelated lines removed):
> #if defined(__OBJC2__)
> OBJC_EXPORT void objc_msgSend_stret(id self, SEL op, ...);
> #else
> /* For compatibility with old objc-runtime.h header */
> OBJC_EXPORT void objc_msgSend_stret(void * stretAddr, id self, SEL op, ...);
> #endif
So, if the declaration is actually the first (I’m compiling for iOS 4.2, so I’m pretty sure __OBJC2__ is defined), how do you use it and get the return value of the function?
Jeff Kelley
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden