• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Multiple declarations of objc_msgSend_stret
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Multiple declarations of objc_msgSend_stret
      • From: Kyle Sluder <email@hidden>
    • Re: Multiple declarations of objc_msgSend_stret
      • From: Greg Parker <email@hidden>
  • Prev by Date: Disable Links in WebView?
  • Next by Date: Re: Multiple declarations of objc_msgSend_stret
  • Previous by thread: Re: Disable Links in WebView?
  • Next by thread: Re: Multiple declarations of objc_msgSend_stret
  • Index(es):
    • Date
    • Thread