Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to pass callback from mach-o to CFM



At 9:31 AM -0500 8/28/03, Marc Poirier wrote:

On Thu, 28 Aug 2003, M. Uli Kusterer wrote:

> Why he's passing the "result" pointer as the context pointer
> is beyond me, though.

I guess if it's wrong, I'll change my code too...

It's not _wrong_, just pointless. The CFM side is going to set up your TOC, but you're going to be ignoring it. Thus, it really doesn't matter _what_ you put into the second half of the TVector.

> This also includes code to call a CFM function from MachO, by generating some assembly, which is the part > where George lost me ;-)

It's pretty stock cross-TOC glue. There are some minor changes, such as not bothering to save the old TOC at 20(SP) and having a compiled-in address, but it's the usual load-address-load-TOC-shove-pointer-into-ctr-bctr stuff.

Avi

--
Avi 'rlwimi' Drissman
email@hidden
Argh! This darn mail server is trunca
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.