[Xcb] Make enums more language independent

Barton C Massey bart at cs.pdx.edu
Wed Sep 3 12:04:41 PDT 2008

In message <20080903142130.268928b6 at before> you wrote:
> I am currently working on a set of C++ utility classes
> which are built on top of XCB.


> For that I've extended xcbgen's Enum-class a little bit so
> that it also exports the bit numbers and not only the
> bitmask-values to code-generators (patch #2). The first
> patch replaced the generation of C-style shift-expressions
> for bitmask-values with a decimal number.

I guess this is fine.  We really don't have a hard goal of
making the Python generator as it stands support anything
but C, but I know a folks are deriving their generators for
other languages from it, and this might conceivably make
their lives easier.

I'm not sure why the generator lives in proto instead of
libxcb.  It seems to me like it ought to be moved.

> The third patch replaced the hexadecimal gc-function
> values in xproto.xml by decimal ones (also to make it more
> language independent)

Seems reasonable.  The XML is definitely supposed to be
language-independent. :-)

> I would like to hear comments on this and also a little bit of help on
> how to incorporate the patches into the source-tree (I am new to git
> and distributed development :) )

I've pushed your patches.  

In the future, it would be great if you could submit each
patch as a separate attachment.  That way I don't have to
break them out with a text editor.

Other than that, it looks great!  Thanks much for the
patches, which I've pushed.  I also "fixed" correponding hex
in render.xml and glx.xml (although the latter constitutes a
definite uglification of the description, I'm afraid).


More information about the Xcb mailing list