On 07/15/2010 06:41 PM, kj wrote:
> In <mailman.733.1279124991.1673.python-l...@python.org> Thomas Jollans 
> <tho...@jollans.com> writes:
> 
>> http://docs.python.org/library/ctypes.html#fundamental-data-types
> 
>> c_longdouble maps to float
> 
> Thanks for pointing this out!
> ~K
> (Does it make *any difference at all* to use c_longdouble instead
> of c_double?  If not, I wonder what's the point of having c_longdouble
> at all.)

they're still different types (in C).

on my machine, a double is 64 bits wide, while a long double is 128 bits
wide. This means that a function that expects a long double argument
will expect 16 bytes, but ctypes will only pass 8 bytes if you tell it
to pass double. The same applies to return values.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to