Skip to content

Commit

Permalink
Initial implementation of enum discrimnant sizing.
Browse files Browse the repository at this point in the history
Allows an enum with a discriminant to use any of the primitive integer
types to store it.  By default the smallest usable type is chosen, but
this can be overridden with an attribute: `#[repr(int)]` etc., or
`#[repr(C)]` to match the target's C ABI for the equivalent C enum.

This commit breaks a few things, due to transmutes that now no longer
match in size, or u8 enums being passed to C that expects int, or
reflection; later commits on this branch fix them.
  • Loading branch information
jld committed Oct 29, 2013
1 parent f1124a2 commit 01740ac
Show file tree
Hide file tree
Showing 5 changed files with 252 additions and 77 deletions.
Loading

0 comments on commit 01740ac

Please sign in to comment.