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.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/nexgb/xgbgen/type.go b/nexgb/xgbgen/type.go
index 1e06bda..d8e76a2 100644
--- a/nexgb/xgbgen/type.go
+++ b/nexgb/xgbgen/type.go
@@ -221,7 +221,7 @@ func (e *EventCopy) XmlName() string {
}
func (e *EventCopy) Size() Size {
- panic("Cannot take size of EventCopy type.")
+ return newExpressionSize(&Value{v: 32})
}
func (e *EventCopy) Initialize(p *Protocol) {
@@ -252,11 +252,14 @@ func (e *Error) XmlName() string {
}
func (e *Error) Size() Size {
- panic("Cannot take size of Error type.")
+ return newExpressionSize(&Value{v: 32})
}
func (e *Error) Initialize(p *Protocol) {
e.srcName = TypeSrcName(p, e)
+ for _, field := range e.Fields {
+ field.Initialize(p)
+ }
}
func (e *Error) ErrConst() string {
@@ -283,7 +286,7 @@ func (e *ErrorCopy) XmlName() string {
}
func (e *ErrorCopy) Size() Size {
- panic("Cannot take size of ErrorCopy type.")
+ return newExpressionSize(&Value{v: 32})
}
func (e *ErrorCopy) Initialize(p *Protocol) {