diff options
| author | Andrew Gallant <[email protected]> | 2013-12-28 10:02:18 -0500 |
|---|---|---|
| committer | Andrew Gallant <[email protected]> | 2013-12-28 10:02:18 -0500 |
| commit | c3541209a0fb8271645c882f7e4a4d7254823992 (patch) | |
| tree | 1bf8042cbe4c01f8f2b74640142ef35ba9e12630 /xgbgen/go_list.go | |
| parent | 276338409158b6e8f45afadc94bd16532a369ef8 (diff) | |
It appears that the "Str" type (which is built into the core X protocol)
doesn't specify any padding. So it has to be treated as a special case.
Close #12.
Diffstat (limited to 'xgbgen/go_list.go')
| -rw-r--r-- | xgbgen/go_list.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/xgbgen/go_list.go b/xgbgen/go_list.go index 4cf962a..fa8df69 100644 --- a/xgbgen/go_list.go +++ b/xgbgen/go_list.go @@ -29,7 +29,10 @@ func (f *ListField) Read(c *Context, prefix string) { c.Putln("byteString := make([]%s, %s)", t.SrcName(), length) c.Putln("copy(byteString[:%s], buf[b:])", length) c.Putln("%s%s = string(byteString)", prefix, f.SrcName()) - c.Putln("b += xgb.Pad(int(%s))", length) + // This is apparently a special case. The "Str" type itself + // doesn't specify any padding. I suppose it's up to the + // request/reply spec that uses it to get the padding right? + c.Putln("b += int(%s)", length) c.Putln("}") } else if t.SrcName() == "byte" { c.Putln("%s%s = make([]%s, %s)", |
