declaring C enum types

Fergus Henderson fjh at
Wed Oct 16 11:13:56 EDT 2002

On 16-Oct-2002, Antony Courtney <antony at> wrote:
> Does anyone know off hand:
>    - Is it a safe, portable assumption that enums will always be 
> encoded as an unsigned short or 16-bit word?

No, that assumption is not safe or portable.

>    - If not, then how should enum values be declared in the FFI?

Fergus Henderson <fjh at>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <>  |     -- the last words of T. S. Garp.

More information about the FFI mailing list