Allow structure alignment specification when using ABI (similar to ctypes' _pack_ attribute)
It is not uncommon for libraries, especially the ones that serialize and serialize data internally and send it over a socket, to constrain alignment of structs exposed in its API.
When using CFFI in ABI mode, it would be useful to let user specify structure packing modes. For example, ctypes accomplishes this with
_pack_ = 1 attribute.
Microsoft compiler understand a
#pragma directive that can enable packing mode for a set of structures. gcc has
Ideally c parser would automatically parse those during
If not at least having an option during structure creation in
new() method. For example:
inst_s = ffi.new("struct s*", pack=1)