aboutsummaryrefslogtreecommitdiff
path: root/nexgb/xgbgen/type.go
diff options
context:
space:
mode:
Diffstat (limited to 'nexgb/xgbgen/type.go')
-rw-r--r--nexgb/xgbgen/type.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/nexgb/xgbgen/type.go b/nexgb/xgbgen/type.go
index 9fbef65..1e06bda 100644
--- a/nexgb/xgbgen/type.go
+++ b/nexgb/xgbgen/type.go
@@ -191,7 +191,7 @@ func (e *Event) XmlName() string {
}
func (e *Event) Size() Size {
- panic("Cannot take size of Event type.")
+ return newExpressionSize(&Value{v: 32})
}
func (e *Event) Initialize(p *Protocol) {
@@ -358,7 +358,7 @@ func (u *Union) Size() Size {
}
func (u *Union) Initialize(p *Protocol) {
- u.srcName = TypeSrcName(p, u)
+ u.srcName = fmt.Sprintf("%sUnion", TypeSrcName(p, u))
for _, field := range u.Fields {
field.Initialize(p)
}