diff options
| author | Andrew Gallant (Ocelot) <[email protected]> | 2012-05-03 01:00:01 -0400 |
|---|---|---|
| committer | Andrew Gallant (Ocelot) <[email protected]> | 2012-05-03 01:00:01 -0400 |
| commit | 9028aaf89872d8d90c65254c17658bfaf8a4918d (patch) | |
| tree | ba8cc21965e466d9fcc1e1c7d38d7f6bbf462fbb /xgbgen/type.go | |
| parent | 552804d994db62e1002f13a8cfbbbc2359d99eef (diff) | |
holy toldeo... things might actually be working
Diffstat (limited to 'xgbgen/type.go')
| -rw-r--r-- | xgbgen/type.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/xgbgen/type.go b/xgbgen/type.go index d8e76a2..3498463 100644 --- a/xgbgen/type.go +++ b/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 |
