aboutsummaryrefslogtreecommitdiff
path: root/nexgb/res/res.go
diff options
context:
space:
mode:
authorAndrew Gallant <jamslam@gmail.com>2016-03-29 16:23:18 -0400
committerPřemysl Janouch <p@janouch.name>2018-09-08 16:49:25 +0200
commit1614b58c420f7875f92a5469c77fd7aeccc7a106 (patch)
treebccb47fefebc03e48c39ab96be807faa0fd15442 /nexgb/res/res.go
parent8d343cfd3a12d910d6a663f2d5f2cd4a41d88ce2 (diff)
downloadhaven-1614b58c420f7875f92a5469c77fd7aeccc7a106.tar.gz
haven-1614b58c420f7875f92a5469c77fd7aeccc7a106.tar.xz
haven-1614b58c420f7875f92a5469c77fd7aeccc7a106.zip
fix structs with field name of 'Bytes'
(it conflict with a method of the same name that is generated for all such structs)
Diffstat (limited to 'nexgb/res/res.go')
-rw-r--r--nexgb/res/res.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/nexgb/res/res.go b/nexgb/res/res.go
index e3d7b02..0ad0389 100644
--- a/nexgb/res/res.go
+++ b/nexgb/res/res.go
@@ -283,7 +283,7 @@ func ResourceIdSpecListBytes(buf []byte, list []ResourceIdSpec) int {
type ResourceSizeSpec struct {
Spec ResourceIdSpec
- Bytes uint32
+ Bytes_ uint32
RefCount uint32
UseCount uint32
}
@@ -295,7 +295,7 @@ func ResourceSizeSpecRead(buf []byte, v *ResourceSizeSpec) int {
v.Spec = ResourceIdSpec{}
b += ResourceIdSpecRead(buf[b:], &v.Spec)
- v.Bytes = xgb.Get32(buf[b:])
+ v.Bytes_ = xgb.Get32(buf[b:])
b += 4
v.RefCount = xgb.Get32(buf[b:])
@@ -328,7 +328,7 @@ func (v ResourceSizeSpec) Bytes() []byte {
b += len(structBytes)
}
- xgb.Put32(buf[b:], v.Bytes)
+ xgb.Put32(buf[b:], v.Bytes_)
b += 4
xgb.Put32(buf[b:], v.RefCount)
@@ -641,7 +641,7 @@ type QueryClientPixmapBytesReply struct {
Sequence uint16 // sequence number of the request for this reply
Length uint32 // number of bytes in this reply
// padding: 1 bytes
- Bytes uint32
+ Bytes_ uint32
BytesOverflow uint32
}
@@ -670,7 +670,7 @@ func queryClientPixmapBytesReply(buf []byte) *QueryClientPixmapBytesReply {
v.Length = xgb.Get32(buf[b:]) // 4-byte units
b += 4
- v.Bytes = xgb.Get32(buf[b:])
+ v.Bytes_ = xgb.Get32(buf[b:])
b += 4
v.BytesOverflow = xgb.Get32(buf[b:])