diff options
Diffstat (limited to 'nexgb/xgbgen/type.go')
| -rw-r--r-- | nexgb/xgbgen/type.go | 12 | 
1 files changed, 12 insertions, 0 deletions
| diff --git a/nexgb/xgbgen/type.go b/nexgb/xgbgen/type.go index d8e76a2..3498463 100644 --- a/nexgb/xgbgen/type.go +++ b/nexgb/xgbgen/type.go @@ -334,6 +334,18 @@ func (s *Struct) Initialize(p *Protocol) {  	}  } +// HasList returns whether there is a field in this struct that is a list. +// When true, a more involved calculation is necessary to compute this struct's +// size. +func (s *Struct) HasList() bool { +	for _, field := range s.Fields { +		if _, ok := field.(*ListField); ok { +			return true +		} +	} +	return false +} +  type Union struct {  	srcName string  	xmlName string | 
