[issue6069] casting error from ctypes array to structure
report at bugs.python.org
Thu Sep 1 19:51:38 CEST 2011
Meador Inge <meadori at gmail.com> added the comment:
On Thu, Sep 1, 2011 at 9:45 AM, Vlad Riscutia <report at bugs.python.org> wrote:
> Vlad Riscutia <riscutiavlad at gmail.com> added the comment:
> Meador, I believe this was the first issue on the tracker that got me looking into bitfield allocation.
> I agree that big-endian on MSVC doesn't make too much sense but you can disregard that - using default endianess will still yield
> different sizes of bitfields when compiled with GCC and MSVC.
Sure, but this particular issue is purporting that the layout of the
structure is incorrect, not that the size is.
> Basically bitfield allocation is compiler specific and patch in issue12528 implements a way to select which
> allocation strategy to be used at runtime instead of hardcoding the one with which Python is compiled. This
> should improve cross-compiler interop. I wanted to hyperlink that patch to all other bitfield bugs, that's why I
> followed up with link to the patch.
Yes, it is very compiler specific. I have some thoughts about making
this configurable, but I will comment on issue12528 with those.
> Feel free to close this, either as not an issue or as a duplicate of issue12528.
I will open a documentation bug and close this one out.
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list