summaryrefslogtreecommitdiff
path: root/xgbgen/field.go
diff options
context:
space:
mode:
authorAndrew Gallant <[email protected]>2016-03-29 16:23:18 -0400
committerAndrew Gallant <[email protected]>2016-03-29 16:23:18 -0400
commitb3a96fa0bc5f20dd08ed8342359a31b64bd761fa (patch)
tree05e13ac8d1a42349b766b0abd6d2a55b5ee3986f /xgbgen/field.go
parent5d9015c16e326c446bad9da7b29698d659069af5 (diff)
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 'xgbgen/field.go')
-rw-r--r--xgbgen/field.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/xgbgen/field.go b/xgbgen/field.go
index bf3b3be..2522a06 100644
--- a/xgbgen/field.go
+++ b/xgbgen/field.go
@@ -87,6 +87,9 @@ func (f *SingleField) Initialize(p *Protocol) {
}
func (f *SingleField) SrcName() string {
+ if f.srcName == "Bytes" {
+ return "Bytes_"
+ }
return f.srcName
}