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 protected]



_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to