projects
/
deliverable
/
barectf.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7a56b77
)
Fix: actually write inner struct offsets
author
Philippe Proulx
<eeppeliteloop@gmail.com>
Sat, 8 Nov 2014 04:01:24 +0000
(23:01 -0500)
committer
Philippe Proulx
<eeppeliteloop@gmail.com>
Sat, 8 Nov 2014 04:01:24 +0000
(23:01 -0500)
barectf/cli.py
patch
|
blob
|
blame
|
history
diff --git
a/barectf/cli.py
b/barectf/cli.py
index 3a1c6377dd2a3d33fe7273cc1a2ada561c6bb6f7..39f66260877f4bcc0c804877d741874fd43c8a4d 100644
(file)
--- a/
barectf/cli.py
+++ b/
barectf/cli.py
@@
-697,7
+697,8
@@
def _struct_to_c_lines(doc, struct):
# as many offset as there are child fields because a future
# sequence could refer to any of those fields
for lname, offset in offset_vars.items():
- line = 'uint32_t off_{}_{}'.format(fname, lname, _CTX_AT);
+ fmt = 'uint32_t off_{}_{} = {} + {};'
+ line = fmt.format(fname, lname, _CTX_AT, offset);
lines.append(_CLine(line))
else:
# offset of this simple field is the current bit index
This page took
0.023047 seconds
and
4
git commands to generate.