From 83a71d464887f4b6cf9124d2f8c565e6f17f2bd3 Mon Sep 17 00:00:00 2001 From: "Andrew Gallant (Ocelot)" Date: Tue, 1 May 2012 01:08:03 -0400 Subject: unions, events and errors... oh my --- nexgb/xgbgen/type.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nexgb/xgbgen/type.go') 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) } -- cgit v1.2.3