• 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
Re: Passing C Style Function Callbacks in Cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Passing C Style Function Callbacks in Cocoa


  • Subject: Re: Passing C Style Function Callbacks in Cocoa
  • From: Dustin Voss <email@hidden>
  • Date: Fri, 5 Mar 2004 14:13:56 -0800

On 5 Mar, 2004, at 1:35 PM, Clark Cox wrote:

On Mar 05, 2004, at 15:26, Ondra Cada wrote:

Clark,

On Friday, Mar 5, 2004, at 20:30 Europe/Prague, Clark Cox wrote:

(who says that pointers and BOOLs are returned in the same register?).

Why, the documentation, of course: I think you want to check the
"Function Return" paragraph of
/Developer/Documentation/DeveloperTools/MachORuntime/2rt_powerpc_abi/
PowerPC_Cal_Conventions.html.

I know that they are in this case, but that might not always be so.
That was made clear from the sentence that you snipped: "You have no
guarantee that that will continue to work in the future".

The objc_msgSend function seems to return ints, BOOLs, etc. as an id. I must confess I don't know how that works to return floating-point values or long longs, since they don't fit into an id-sized register.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Passing C Style Function Callbacks in Cocoa
      • From: Allan Odgaard <email@hidden>
References: 
 >Re: Passing C Style Function Callbacks in Cocoa (From: Ondra Cada <email@hidden>)
 >Re: Passing C Style Function Callbacks in Cocoa (From: Clark Cox <email@hidden>)

  • Prev by Date: Re: Making an NSDrawer transparent
  • Next by Date: Re: Making an NSDrawer transparent
  • Previous by thread: Re: Passing C Style Function Callbacks in Cocoa
  • Next by thread: Re: Passing C Style Function Callbacks in Cocoa
  • Index(es):
    • Date
    • Thread