Summary: | Add enum attribute to arg element to allow type safe protocol generation for languages that support enum as a type. | ||
---|---|---|---|
Product: | Wayland | Reporter: | Erik De Rijcke <derijcke.erik> |
Component: | wayland | Assignee: | Wayland bug list <wayland-bugs> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | enhancement | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Erik De Rijcke
2014-08-04 11:52:05 UTC
The complication here is that we use enums as plain integers, which means also individual bits and sets of bits in bitfields. The attribute would be good for making generated documentation link automatically to the right enum definitions, but for type safety it is not that simple. You probably need another attribute somewhere to say whether it is allowed 'or' the values together, even if the result is not listed in the enum. In that case it's a matter of balancing protocol bloat with type safety I guess. Since an addition/change of protocol isn't easily done, I guess this wont happen soon... I still haven't caught up on what landed with the enum patches in Wayland - is this issue now essentially fixed? I guess it is. Everything described in the original post is/will be merged soon. Remaining issues are not described here (open/closed enum) as I was not aware of that at the time and it will probably get another round of discussions before being fixed. I guess it is. Everything described in the original post is/will be merged soon. Remaining issues are not described here (open/closed enum) as I was not aware of that at the time and it will probably get another round of discussions before being fixed. Closing as resolved as per last few comments. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.