Changeset 58775d30 in mainline for tools/autogen.py
- Timestamp:
- 2015-03-16T16:07:21Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2003739
- Parents:
- 6069061 (diff), 795e2bf (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/autogen.py
r6069061 r58775d30 66 66 for i in range(len(struct['members'])): 67 67 member = struct['members'][i] 68 code = code + ("\temit_constant(%s_OFFSET_%s, offsetof(%s_t, %s));\n" % 68 code = code + ("\temit_constant(%s_OFFSET_%s, offsetof(%s_t, %s));\n" % 69 69 (struct['name'].upper(), member['name'].upper(), struct['name'], 70 70 member['name'])) 71 code = code + ("\temit_constant(%s_SIZE_%s, sizeof(((%s_t *) 0)->%s));\n" % 71 code = code + ("\temit_constant(%s_SIZE_%s, sizeof(((%s_t *) 0)->%s));\n" % 72 72 (struct['name'].upper(), member['name'].upper(), struct['name'], 73 73 member['name'])) 74 74 if 'elements' in member.keys(): 75 code = code + ("\temit_constant(%s_%s_ITEM_SIZE, sizeof(%s));\n" % 75 code = code + ("\temit_constant(%s_%s_ITEM_SIZE, sizeof(%s));\n" % 76 76 (struct['name'].upper(), member['name'].upper(), member['type'])) 77 77 … … 83 83 84 84 code = """ 85 %s 85 %s 86 86 87 87 #define str(s) #s … … 92 92 %s 93 93 94 int main() 94 extern int main(int, char *[]); 95 96 int main(int argc, char *argv[]) 95 97 { 96 98 %s … … 100 102 """ % (generate_includes(struct), generate_struct(struct), 101 103 generate_probes(struct), name.upper(), typename) 102 104 103 105 return code 104 106 … … 167 169 168 170 run() 169
Note:
See TracChangeset
for help on using the changeset viewer.