fix structs with field name of 'Bytes'
(it conflict with a method of the same name that is generated for all such structs)
This commit is contained in:
parent
8d343cfd3a
commit
1614b58c42
|
@ -76,7 +76,8 @@ func readAuthority(hostname, display string) (
|
||||||
return "", nil, err
|
return "", nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
addrmatch := (family == familyWild) || (family == familyLocal && addr == hostname)
|
addrmatch := (family == familyWild) ||
|
||||||
|
(family == familyLocal && addr == hostname)
|
||||||
dispmatch := (disp == "") || (disp == display)
|
dispmatch := (disp == "") || (disp == display)
|
||||||
|
|
||||||
if addrmatch && dispmatch {
|
if addrmatch && dispmatch {
|
||||||
|
|
|
@ -283,7 +283,7 @@ func ResourceIdSpecListBytes(buf []byte, list []ResourceIdSpec) int {
|
||||||
|
|
||||||
type ResourceSizeSpec struct {
|
type ResourceSizeSpec struct {
|
||||||
Spec ResourceIdSpec
|
Spec ResourceIdSpec
|
||||||
Bytes uint32
|
Bytes_ uint32
|
||||||
RefCount uint32
|
RefCount uint32
|
||||||
UseCount uint32
|
UseCount uint32
|
||||||
}
|
}
|
||||||
|
@ -295,7 +295,7 @@ func ResourceSizeSpecRead(buf []byte, v *ResourceSizeSpec) int {
|
||||||
v.Spec = ResourceIdSpec{}
|
v.Spec = ResourceIdSpec{}
|
||||||
b += ResourceIdSpecRead(buf[b:], &v.Spec)
|
b += ResourceIdSpecRead(buf[b:], &v.Spec)
|
||||||
|
|
||||||
v.Bytes = xgb.Get32(buf[b:])
|
v.Bytes_ = xgb.Get32(buf[b:])
|
||||||
b += 4
|
b += 4
|
||||||
|
|
||||||
v.RefCount = xgb.Get32(buf[b:])
|
v.RefCount = xgb.Get32(buf[b:])
|
||||||
|
@ -328,7 +328,7 @@ func (v ResourceSizeSpec) Bytes() []byte {
|
||||||
b += len(structBytes)
|
b += len(structBytes)
|
||||||
}
|
}
|
||||||
|
|
||||||
xgb.Put32(buf[b:], v.Bytes)
|
xgb.Put32(buf[b:], v.Bytes_)
|
||||||
b += 4
|
b += 4
|
||||||
|
|
||||||
xgb.Put32(buf[b:], v.RefCount)
|
xgb.Put32(buf[b:], v.RefCount)
|
||||||
|
@ -641,7 +641,7 @@ type QueryClientPixmapBytesReply struct {
|
||||||
Sequence uint16 // sequence number of the request for this reply
|
Sequence uint16 // sequence number of the request for this reply
|
||||||
Length uint32 // number of bytes in this reply
|
Length uint32 // number of bytes in this reply
|
||||||
// padding: 1 bytes
|
// padding: 1 bytes
|
||||||
Bytes uint32
|
Bytes_ uint32
|
||||||
BytesOverflow uint32
|
BytesOverflow uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -670,7 +670,7 @@ func queryClientPixmapBytesReply(buf []byte) *QueryClientPixmapBytesReply {
|
||||||
v.Length = xgb.Get32(buf[b:]) // 4-byte units
|
v.Length = xgb.Get32(buf[b:]) // 4-byte units
|
||||||
b += 4
|
b += 4
|
||||||
|
|
||||||
v.Bytes = xgb.Get32(buf[b:])
|
v.Bytes_ = xgb.Get32(buf[b:])
|
||||||
b += 4
|
b += 4
|
||||||
|
|
||||||
v.BytesOverflow = xgb.Get32(buf[b:])
|
v.BytesOverflow = xgb.Get32(buf[b:])
|
||||||
|
|
|
@ -61,7 +61,7 @@ type Conn struct {
|
||||||
seqChan chan uint16
|
seqChan chan uint16
|
||||||
reqChan chan *request
|
reqChan chan *request
|
||||||
closing chan chan struct{}
|
closing chan chan struct{}
|
||||||
|
|
||||||
// ExtLock is a lock used whenever new extensions are initialized.
|
// ExtLock is a lock used whenever new extensions are initialized.
|
||||||
// It should not be used. It is exported for use in the extension
|
// It should not be used. It is exported for use in the extension
|
||||||
// sub-packages.
|
// sub-packages.
|
||||||
|
|
|
@ -87,6 +87,9 @@ func (f *SingleField) Initialize(p *Protocol) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *SingleField) SrcName() string {
|
func (f *SingleField) SrcName() string {
|
||||||
|
if f.srcName == "Bytes" {
|
||||||
|
return "Bytes_"
|
||||||
|
}
|
||||||
return f.srcName
|
return f.srcName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue