Re: feature request for setting _pack_ to a higher value
Mads Kiilerich <[email protected]>
| Newsgroups | gmane.comp.python.ctypes |
|---|---|
| Message-ID | <[email protected]> |
Axel Seibert wrote, On 03/22/2010 11:06 PM: > Am 22.03.2010 um 21:56 schrieb Mads Kiilerich >> Axel Seibert wrote, On 03/22/2010 07:58 AM: >> >>> Hi, Mads, dear list! >>> >>> >>>> Can you give an (or several) exact example of a problematic C >>>> declaration and what you would have hoped worked with ctypes and how you >>>> have to workaround? >>>> >>> I don't think I expected some magic bullet from ctypes, I just had not expected so many problems when changing from Windows to Linux. And, ctypes already has already in there that I need -- there is just one check within ctypes that makes my workaround currently impossible. >>> >>> This is an excerpt from the python that the code generation created for me from the header file. They are the same under windows& linux. >>> >> FWIW I think you would help yourself by also posting or referring to the exact corresponding C declaration and references to exactly which version of which tool you have used and how you invoked it. >> >> gcc on linux compiles the structs "correctly" with 8 bytes alignment? Where do that alignment come from? >> > If you mean "gcc compiled the structs" as in "the C compiler gcc under Linux compiled C sources using the structs with 8 bytes alignment" -- then I have no idea, as I'm not developing in C. > So you have this library and some header files which you haven't/can't/won't show us. You say that the auto-generated ctypes "headers" doesn't match the library, but you haven't provided any evidence that the original header files were correct. As far as I can see it is very likely that you are requesting wrong semantics in order to work around wrong headers - or incorrect use of gccxml. I'm not sure it is a good idea. I hope a real ctypes expert can give a better answer. /Mads ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev