Mailing Lists: Apple Mailing Lists

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

TVector for xTalk glue.



On Fri, 29 Aug 2003 11:18:33 +0900, Kiyoto Takeuchi <email@hidden>
wrote:
>>> If anyone know how to pass mycallback function from Mach-O to CFM App,
>>> please advice me your informations.
>>
>> CFM expects the address of a TVector. You can fake one by stuffing the MachO
>> ProcPtr into this struct:
>>
>> typedef struct TVector_struct {
>> ProcPtr fProcPtr;
>> void* fTOC;
>> } TVector_rec, *TVector_ptr;
>>
>> Since MachO doesn't care what's in the TOC you don't have to put anything in
>> that field.
>
> When I use TVector_struct on MACH-O, clearing fTOC by "NULL" is no problem
> (for compatibility)?
> Please advice me.

This is true. You could just as safely use 0xDEADBEEF. The TOC is not used
by macho to access globals the way it is in CFM. It doesn't matter what's in
the second long of the TVector.

--
Enjoy,
George Warner,
Schizophrenic Optimization Scientists
Apple Developer Technical Support (DTS)
_______________________________________________
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.