From: Jamey Sharp Date: Wed, 14 Jun 2006 23:45:24 +0000 (-0700) Subject: Bugfix for size.py: count padding in struct size. X-Git-Tag: 1.0_branch~164 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4f1ff61d7906b3a27bb261564cf681a97154df18;p=profile%2Fivi%2Fxcb-proto.git Bugfix for size.py: count padding in struct size. --- diff --git a/src/size.py b/src/size.py index 885c1ae..8376833 100755 --- a/src/size.py +++ b/src/size.py @@ -36,6 +36,10 @@ class AnnotateSize(XMLFilterBase): elif self.union is not None: self.totalsize = max(self.totalsize, size) attrs = AttributesUnion(attrs, bytes=str(size)) + elif name == 'pad': + assert self.union is None + if self.struct is not None: + self.totalsize += int(attrs['bytes']) elif name == 'xidtype': self.setTypeSize(attrs['name'], 4) elif name == 'typedef':