Well it'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'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.
Vlad Riscutia wrote:It could also be good to have a mode which lets you specify
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
*exactly* how the bits are laid out, independent of any
particular compiler.
--
Greg
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/riscutiavlad%40gmail.com