summaryrefslogtreecommitdiff
path: root/xgbgen/request_reply.go
diff options
context:
space:
mode:
authorAndrew Gallant (Ocelot) <[email protected]>2012-05-06 17:48:40 -0400
committerAndrew Gallant (Ocelot) <[email protected]>2012-05-06 17:48:40 -0400
commit26191c0f45bd6a112085c44c271a135d65c80f18 (patch)
tree1ab3980e5daef82c6da6832dfb9c89543612d1f0 /xgbgen/request_reply.go
parent57ae07f66541348497db9a5bb84c99770e7b14c1 (diff)
add more extension cruft. make extension checking more uniform.
Diffstat (limited to 'xgbgen/request_reply.go')
-rw-r--r--xgbgen/request_reply.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/xgbgen/request_reply.go b/xgbgen/request_reply.go
index 7cd2859..c7a4cf8 100644
--- a/xgbgen/request_reply.go
+++ b/xgbgen/request_reply.go
@@ -22,7 +22,7 @@ type Request struct {
// It also initializes the reply if one exists, and all fields in this request.
func (r *Request) Initialize(p *Protocol) {
r.srcName = SrcName(p, r.xmlName)
- if p.Name != "xproto" {
+ if p.isExt() {
r.srcName = strings.Title(strings.ToLower(p.Name)) + r.srcName
}
@@ -93,7 +93,7 @@ func (r *Request) Size(c *Context) Size {
// request. In an extension request, this byte is always occupied
// by the opcode of the request (while the first byte is always occupied
// by the opcode of the extension).
- if c.protocol.Name == "xproto" {
+ if !c.protocol.isExt() {
size = size.Add(newFixedSize(3))
} else {
size = size.Add(newFixedSize(4))