[Xcb] naming convention again ;)

Jamey Sharp jamey at minilop.net
Mon Dec 12 15:59:38 PST 2005

On Mon, Dec 12, 2005 at 04:31:06PM -0500, Jeremy A. Kolb wrote:
> On Mon, 12 Dec 2005, Jamey Sharp wrote:
> > If the name "data" were selected just because it makes Mesa code
> > generation easy, I wouldn't approve. In that case you should load
> > glx.xml from xcb-proto and look up the correct list name for each
> > request: this is easy to do when you're already processing a bunch of
> > XML anyway, and it's one of the big reasons why we built a protocol
> > description language.
> Ah yes.  The problem is that all of these replies have (roughly) 
> the exact same format.  The fields had to be called data because there was no 
> other way to autogenerate them from the glapi.xml file.  In X11 glx they 
> use one structure to deal with all of these GLXSingleReply), and 
> something similar when sending the request, we couldn't do the same in XCB.

I may still be confused, but I think you missed my point. When
generating code for GetBooleanv from glapi.xml, why can't you do
something like this XPath query across XCB's glx.xml?

That particular example will evaluate to "data" -- so you shouldn't have
to hardcode that string anywhere.

> For example in GetBooleanv depending on retval you'll have different lists 
> starting at different points in the padding.  If there is only one value 
> to return it will be returned in pad4.  Since this is repeated for a ton 
> of replies it was much easier to give consistent names.

We still need to deal with that, and I'd forgotten about it, but it's
not related to reply list naming, right?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/xcb/attachments/20051212/f67acc06/attachment.pgp

More information about the Xcb mailing list