0 issues 1 contributor 4 branches 0 releases
Additions: 4 Deletions: 7 View patch
1 if node.is_union {
2 g.typedefs.writeln('typedef union $name $name;')
3 } else {
4- /*
5- attrs := if node.attrs.contains('packed') {
6- '__attribute__((__packed__))'
7- } else {
8- ''
9- }
10- */
11 g.typedefs.writeln('typedef struct $name $name;')
12 }
13 }
14
1 pre_pragma += '#pragma pack(push, $attr.arg)\n'
2 post_pragma += '#pragma pack(pop)'
3 }
4+ 'packed' {
5+ pre_pragma += '#pragma pack(push, 1)\n'
6+ post_pragma += '#pragma pack(pop)'
7+ }
8 else {}
9 }
10 }
11