[Xcb] RFC: Altenum updates for xcb/proto
Antoine Latter
aslatter at gmail.com
Wed Feb 25 19:09:44 PST 2009
On Wed, Feb 25, 2009 at 7:14 PM, Peter Harris <git at peter.is-a-geek.org> wrote:
> On Wed, Feb 25, 2009 at 7:52 PM, Antoine Latter wrote:
>> I thought this discussion was on how to do the C generation, not what
>> to put in the XML? Maybe I missed something. As long as we still
>> want to go forward with the "altenum" attribute in the XML I'm happy.
>
> That part of the discussion was about the merits of
>
> <enum Nullable/None>
> vs
> <enum Window/None><enum Pixmap/None><enum Atom/None> etc
>
> for use with altenums.
>
> Or, to use links to patches,
> http://cgit.freedesktop.org/~peterh/xcbproto-enum/diff/
> vs
> http://cgit.freedesktop.org/~peterh/xcbproto-enum/diff/?h=plethora
>
> Does the plethora version work as well (or better) with your planned
> code generator?
>
I follow you now.
My plan so far is going to be to, for every distinct type-altenum
pair, generate a set of constants named from the name of the type and
the names of the enum elements.
So with either plan I would be generating sets of typed constant named:
windowNone, atomNone, timecoordNone, etc.
The names aren't as fully qualified as they properly should be,
though. But unless I uncover any name-clashes in practice, I'll be
generating the same costants for either patch.
Antoine
More information about the Xcb
mailing list