On 2 May 2011, at 19:51, Mathieu Suen wrote:
> By the way David do you think this is valuable patch for LanguageKit?
A similar fix is required, but your code will break on PowerPC32, SPARC32, and
ARM. The correct solution should be something like:
ffi_type *ffi_type_cgfloat = (sizeof(CGFloat) == sizeof(double)) ?
&ffi_type_double : &ffi_type_float;
ffi_type *_ffi_type_nspoint_elements[] = {
ffi_type_cgfloat, ffi_type_cgfloat, NULL
};
David
> On Apr 30, 2011, at 10:18 PM, Mathieu Suen wrote:
>
>> Eventually I found why it was not called:
>>
>> ffi_type *_ffi_type_nspoint_elements[] = {
>> &ffi_type_float, &ffi_type_float, NULL
>> };
>>
>> On osx x86-64 it is not float but double.
>> I have change it to:
>>
>> #ifdef __i386__
>> ffi_type *_ffi_type_nspoint_elements[] = {
>> &ffi_type_float, &ffi_type_float, NULL
>> };
>> #else
>> ffi_type *_ffi_type_nspoint_elements[] = {
>> &ffi_type_double, &ffi_type_double, NULL
>> };
>> #end
>>
>>
>>
>> Mathieu
>>
>> _______________________________________________
>> Etoile-discuss mailing list
>> [email protected]
>> https://mail.gna.org/listinfo/etoile-discuss
>
>
> _______________________________________________
> Etoile-discuss mailing list
> [email protected]
> https://mail.gna.org/listinfo/etoile-discuss
-- Sent from my IBM 1620
_______________________________________________
Etoile-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/etoile-discuss