projects
/
free-sw
/
xcb
/
proto
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7aee7e3
)
Bugfix for size.py: count padding in struct size.
author
Jamey Sharp
<jamey@minilop.net>
Wed, 14 Jun 2006 23:45:24 +0000
(16:45 -0700)
committer
Jamey Sharp
<jamey@minilop.net>
Wed, 14 Jun 2006 23:45:24 +0000
(16:45 -0700)
src/size.py
patch
|
blob
|
history
diff --git
a/src/size.py
b/src/size.py
index
885c1ae
..
8376833
100755
(executable)
--- 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':