Re: [ctypes-users] Union inside structure result into an empty union
Brought to you by:
theller
From: Vincent B. <be...@lu...> - 2008-09-09 19:17:36
|
OoO Pendant le repas du mardi 09 septembre 2008, vers 19:21, Thomas Heller <th...@ct...> disait : >> Standard Python module struct module does not have "long double" too. Is >> it some other way I can guess the correct alignment for long double >> without enumerating all the platforms? > No idea. > Python 2.6's ctypes does have a c_longdouble type; maybe you can use that? > It is available for installation as third-party module via SVN, the ctypes > version number is 1.1. > http://svn.python.org/projects/ctypes/branches/ctypes-1.1/ Thanks Thomas. This would be last resort solution. I am looking a bit how are defined other types. It seems that to define a type, it must be supported by the struct module (or is _type_ for libffi?). Given the size and the alignment of a C type (16 and 16 in my case for x86_64), can I build a placeholder from _SimpleCData that would enforce this size and alignment? Thanks. -- BOFH excuse #387: Your computer's union contract is set to expire at midnight. |