[Mono-list] Marshaling on Mac

Andreas Färber andreas.faerber at web.de
Wed Aug 27 10:56:05 EDT 2008


Hi,

Am 27.08.2008 um 16:07 schrieb Robert Jordan:

> Andreas Färber wrote:
>> Am 26.08.2008 um 10:19 schrieb silver83:
>>
>>> 1. Is this the case for all / most of Carbon APIs ?
>>
>> Mac68K seems to apply to ppc only, so no. To find out where it's
>> necessary, check the header files on your system.
>
> It actually applies to all architectures.
>
> It means "use the same packing as we used a decade ago on a Mac68K
> under Mac OS 9". All Carbon headers exhibit this pragma.

Hm, in the ABI docs its alignment rules are only listed for ppc, not  
ppc64 or IA-32...

Mac68K differs from Packed encoding there, so Pack=1 would not seem to  
be the ultimate solution in all cases. Pack=2 might work better,  
except for vector (16), not sure how char (1) fits into this. In the  
worst case a custom helper for mashalling IntPtr <-> struct via Mac68K  
might need to be implemented?

Andreas



More information about the Mono-list mailing list