[Xcb] naming convention again ;)

Jamey Sharp jamey at minilop.net
Mon Dec 12 12:51:46 PST 2005


On Tue, Jun 21, 2005 at 10:26:26PM -0400, Jeremy A. Kolb wrote:
> I just updated my mesa branch and found a mistake that I had made in the 
> code generation.  While fixing this I noticed (had forgotten) that all of 
> the lists returned are named "Data".  Clearly this goes against the naming 
> conventions that we are following, however it is important to have a 
> consistent name for Mesa's code generation.  I had forgotten about this 
> but I think it's something that needs to be brought up.

Hmmm, looks like I failed to reply to this. That may have been because I
didn't understand it.

I don't have any problem with using the name "data" for the <list> field
in any reply that has only one <list> and no other interesting fields.
Usually the meaning of that list is described by the name of the
request, and any name you give the list itself would seem redundant:
XCBGlxReadPixelsPixels would be dumb, for instance. However, in many
cases it makes sense to give a descriptive name because there isn't that
overlap: XCBQueryTreeChildren is much better than XCBQueryTreeData.

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.

--Jamey
-------------- 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/651ff2f2/attachment.pgp


More information about the Xcb mailing list