[PATCH wayland] Add "enum" attribute to "arg" elements
ppaalanen at gmail.com
Wed Apr 22 23:49:23 PDT 2015
On Wed, 22 Apr 2015 08:38:22 -0700
Bill Spitzak <spitzak at gmail.com> wrote:
> On 04/21/2015 11:34 PM, Pekka Paalanen wrote:
> > I also think this discussion is going off-topic. You wanted to add
> > annotations to the XML, so you could find out about enum and bitfield
> > arguments, so let's keep to that. There is value in simplicity.
> Absolutely agree
> > How about this:
> Auke's original patch is much more like what is wanted.
Yeah, it mostly just lacked a clear explanation on what the new
attributes mean. It seems Auke and Jeroen had quite different
interpretations and goals.
> > However, a remaining problem is that an interface cannot reference an
> > <enum> defined for a different interface.
> You can reference objects defined by a different interface, right? I
> don't think this is any different. Objects work because you know they
> are represented by an id. For many languages the code generation does
> not depend on the details of the enumeration, it just needs to know it's
> name, so there is no need to parse the other file. And whether int or
> uint is in the api, but that information is already there.
Sure, by the interface name. However, I assumed the new attribute would
refer to an <enum> by it's short name, not a fully qualified name that
includes the interface name.
Allowing fully qualified names is another thing. Should we allow it? Is
it good practice? Is it useful? How would the fully qualitified names
Even if it's not used for codegen, you need it for docgen if you want
to be able to reference other interfaces' enums. Many interfaces may
have same-named enums.
More information about the wayland-devel