[Xcb] [patch] Define and use the opcode numbers.

Zephaniah E. Hull warp at aehallh.com
Thu Oct 12 01:55:43 PDT 2006

On Thu, Aug 24, 2006 at 12:35:41PM -0400, Zephaniah E. Hull wrote:
> On Wed, Aug 23, 2006 at 11:20:39AM -0700, Jamey Sharp wrote:
> > On Fri, Aug 18, 2006 at 04:21:46PM -0400, Zephaniah E. Hull wrote:
> > > Hard coding the opcode numbers in the function just makes it harder to
> > > figure out what's going on, but much more to the point, not defining the
> > > opcodes in the header makes it impossible to use the generated headers
> > > instead of the x11proto headers in the server.
> > 
> > That's a really good argument. :-) A further patch to replace hardcoded
> > opcodes in the rest of XCB's implementation would be welcome as well --
> > I think the only one is in xcb_out.c, in XCBSendRequest.
> > 
> > > -      <do-request ref="XCB{$ext}{$req/@name}Req" opcode="{$req/@opcode}"
> > > +      <do-request ref="XCB{$ext}{$req/@name}Req" opcode="XCB_{$ext}{@name}"
> > 
> > My only issue is with this naming convention. I know Xlib uses
> > X_{ext}{name}, but mixing underscores and camel-caps is just wrong. (I
> > regret having even used camel-caps in XCB, which I did because Xlib did,
> > but I'm not changing that now.)
> > 
> > Of course, XCB{ext}{name} is already used for the request functions. How
> > about, for example, XCBCreateWindowOpcode, or perhaps
> > XCBOpcodeCreateWindow?
> Hrm, whatever works.  Preferably something that doesn't add a ton to the
> total length, but aside from that I have no real preference.
> Zephaniah E. Hull.

Er, it's a bit later now, there's been a grand renaming, the git split,
however, er.

We're still missing the opcode defines.  What are the chances of getting
them added before the release? :)

Zephaniah E. Hull.

	  1024D/E65A7801 Zephaniah E. Hull <warp at aehallh.com>
	   92ED 94E4 B1E6 3624 226D  5727 4453 008B E65A 7801
	    CCs of replies from mailing lists are requested.

<Deek> If the user points the gun at his foot and pulls the trigger, it
       is our job to ensure the bullet gets where it's supposed to.
-------------- 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/20061012/d768603a/attachment.pgp

More information about the Xcb mailing list