> On 29 Dec. 2017, at 03:31, Jeremy Yallop <[email protected]> wrote:
>> Hmm. What does it mean when it says “the size and alignment are retrieved”?? >> The only way to do that would be to generate C code and measure it. > > Indeed, that's exactly what happens. The C standard doesn't place > many constraints on the layout of enums, so there isn't really another > way of building enum types that’s guaranteed to work. Layout rules in general for C are fully fixed by the ABI. That’s platform dependent BUT you only need to figure out the ABI once per platform. Otherwise, there’d be no way to bind to the C standard library which is usually the vendor provided access to the OS kernel. — john skaller [email protected] http://felix-lang.org _______________________________________________ Ctypes mailing list [email protected] http://lists.ocaml.org/listinfo/ctypes
