Re: feature request for setting _pack_ to a higher value
Axel Seibert <[email protected]>
| Newsgroups | gmane.comp.python.ctypes |
|---|---|
| Message-ID | <[email protected]> |
Hi, Thomas! I tried to apply your solution to my problem. I found two issues with that: a) a couple of my structs that require padding are Unions. Do you have a solution for that? b) I believe that line "missing = a - size % a" needs to be replaced by missing = a - sizeof(t) % a The original version yields the following result - notice the lines starting with "b1" and c a: 0 1 1 a1: 8 4 4 b: 16 2 2 b1: 20 4 4 c: 32 4 4 c1: 40 4 4 Wtih the change above applies, the result is more what I expected: a: 0 1 1 a1: 8 4 4 b: 16 2 2 b1: 24 4 4 c: 32 4 4 c1: 40 4 4 So long, Axel ------------------------------------------------------------------------------ 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