[issue3132] implement PEP 3118 struct changes
Meador Inge
report at bugs.python.org
Thu May 20 20:13:24 CEST 2010
Meador Inge <meadori at gmail.com> added the comment:
> Granted, yes. But I wouldn't expect the same padding for 'BT{BI}' and
> 'BBI'. 'BT{BI}' should match a C struct which itself has an embedded
> struct. For C, I get the following results on my machine:
I wasn't sure. The C99 standard does not specify what the behavior should be. It is implementation defined. I guess most implementations just set the alignment of the struct with the alignment of its most demanding member.
I need to change how the alignment for nested structures is computed. Right now alignments are being computed as if the 'T{...}' codes were not there. I will hold off until we decide what that rule should be, but I think the most demanding element rule seems reasonable.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3132>
_______________________________________
More information about the Python-bugs-list
mailing list