diff options
| author | Andrew Gallant (Ocelot) <[email protected]> | 2012-05-02 01:46:30 -0400 |
|---|---|---|
| committer | Andrew Gallant (Ocelot) <[email protected]> | 2012-05-02 01:46:30 -0400 |
| commit | 552804d994db62e1002f13a8cfbbbc2359d99eef (patch) | |
| tree | 1b88b3177a8a12a1e7da3b12f348dba27ee8a581 /xgbgen/translation.go | |
| parent | 590f8a3cd197f6fc344cd59fa19b2f2696baac43 (diff) | |
finally starting on the crescendo: requests and replies.
Diffstat (limited to 'xgbgen/translation.go')
| -rw-r--r-- | xgbgen/translation.go | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/xgbgen/translation.go b/xgbgen/translation.go index 36daa8b..9c7603b 100644 --- a/xgbgen/translation.go +++ b/xgbgen/translation.go @@ -210,11 +210,13 @@ func (x *XMLRequest) Translate() *Request { // computation of the 'odd_length' field. However, 'string_len' is not // defined. Therefore, let's forcefully add it as a 'local field'. // (i.e., a parameter in the caller but does not get send over the wire.) - stringLenLocal := &LocalField{&SingleField{ - xmlName: "string_len", - Type: newTranslation("CARD16"), - }} - r.Fields = append(r.Fields, stringLenLocal) + if x.Name == "QueryTextExtents" { + stringLenLocal := &LocalField{&SingleField{ + xmlName: "string_len", + Type: newTranslation("CARD16"), + }} + r.Fields = append(r.Fields, stringLenLocal) + } return r } |
