[PATCH wayland] Add "enum" attribute to "arg" elements

Bill Spitzak spitzak at gmail.com
Thu Apr 23 10:44:50 PDT 2015


On 04/22/2015 11:38 PM, Pekka Paalanen wrote:

> Given this and that they must not affect codegen, what are the remaining
> differences between enums and bitfields? Enum can be an int, but a
> bitfield cannot? Is it worth to have the distinction in the language at
> all?

The distinction is that in a bitfield A|B is valid value to pass, but 
that is not a valid value to pass for an enumeration. Bindings really 
want this information.

This information must be on the enumeration itself, not on the argument. 
I don't know of any language where the validity or return type of doing 
A|B depends on where the expression is being used.


More information about the wayland-devel mailing list