documentation patch, oddities, and proposals
Richard Henderson
rth@redhat.com
Mon Nov 9 07:39:00 GMT 2015
On 11/07/2015 08:00 PM, Tom Tromey wrote:
> rth> Indeed. It would be very nice to require a separate layout call,
> rth> rather than imply it from ffi_prep_cif. This would also nicely fix
> rth> the problem that libgo encountered wrt zero-sized structures.
>
> What was that problem btw? If it's something users might encounter I
> could update the docs to account for it.
The fact that size 0 is the trigger that the structure hasn't been layed out.
So every call to such a function re-enters the layout for a zero-sized struct.
In the end it still works, but there's more overhead than needed.
r~
More information about the Libffi-discuss
mailing list