Hello,
I'm using cffi for trying to revive the Qt bindings. Doing so I found out that for the calculation of the size of struct types, the alignment of the struct itself is not taking into account. For the following struct for example
(defcstruct smoke-class (class-name string) (parents index) (class-fn :pointer) (enum-fn :pointer) (flags :unsigned-short))
cffi calculates a size of 18, which should be 20 (please correct me if I'm wrong). Attached is a patch which defines an extra method for foreign-type-size for a foreign-struct-type argument. This method is used to apply adjust-for-alignment on the newly defined struct.
Greetings, Wilco