Well it&#39;s not really layout, because alignment is handled by pack option. It is how the field gets allocated. At this point I believe it will be more complex to come up with custom allocation option, precisely because it&#39;s up to each compiler to allocate the structure. Such flexibility will add a lot of complexity and it might not payoff. This is debatable, but I would go with a 3 option strategy at this point - native, GCC, MSVC and if we actually find interop issues with other compilers we can look into custom allocation.<div>
<br></div><div>I will try to refactor the C code to more easily accommodate a mode option (while leaving behavior the same for now), then we can decide how the library interface should look like.</div><div><br></div><div>
Thank you,</div><div>Vlad</div><div><br><div class="gmail_quote">On Sat, Jun 25, 2011 at 4:37 PM, Greg Ewing <span dir="ltr">&lt;<a href="mailto:greg.ewing@canterbury.ac.nz">greg.ewing@canterbury.ac.nz</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">Vlad Riscutia wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Longer term though, I think it would be better to add a property on the Structure class for configurable allocation strategy, for example Native (default), GCC, MSVC<br>
</blockquote>
<br></div>
It could also be good to have a mode which lets you specify<br>
*exactly* how the bits are laid out, independent of any<br>
particular compiler.<br>
<br>
-- <br><font color="#888888">
Greg</font><div><div></div><div class="h5"><br>
______________________________<u></u>_________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org" target="_blank">Python-Dev@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/python-dev" target="_blank">http://mail.python.org/<u></u>mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="http://mail.python.org/mailman/options/python-dev/riscutiavlad%40gmail.com" target="_blank">http://mail.python.org/<u></u>mailman/options/python-dev/<u></u>riscutiavlad%40gmail.com</a><br>
</div></div></blockquote></div><br></div>