diff options
| author | Andrew Gallant (Ocelot) <[email protected]> | 2012-05-01 01:08:03 -0400 |
|---|---|---|
| committer | Andrew Gallant (Ocelot) <[email protected]> | 2012-05-01 01:08:03 -0400 |
| commit | 3d1ff310f558a408228206efbecef7ba71065e6b (patch) | |
| tree | 04b038167b46be186e5b671099dbd06df8a65e29 /xgbgen/type.go | |
| parent | 5d79dc324de0a23fd0543951f0fd1f0352018654 (diff) | |
unions, events and errors... oh my
Diffstat (limited to 'xgbgen/type.go')
| -rw-r--r-- | xgbgen/type.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xgbgen/type.go b/xgbgen/type.go index 9fbef65..1e06bda 100644 --- a/xgbgen/type.go +++ b/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) } |
