OLD | NEW |
1 /* tests data packing and unpacking */ | 1 /* tests data packing and unpacking */ |
2 | 2 |
3 struct msg { | 3 struct msg { |
4 string from_name = 1; | 4 string from_name = 1; |
5 string to_name = 2; | 5 string to_name = 2; |
6 optional struct[kill] attack = 3; | 6 optional struct[kill] attack = 3; |
7 array struct[run] run = 4; | 7 array struct[run] run = 4; |
8 } | 8 } |
9 | 9 |
10 struct kill { | 10 struct kill { |
11 string weapon = 0x10121; | 11 string weapon = 0x10121; |
12 string action = 2; | 12 string action = 2; |
13 optional int how_often = 3; | 13 optional int how_often = 3; |
14 } | 14 } |
15 | 15 |
16 struct run { | 16 struct run { |
17 string how = 1; | 17 string how = 1; |
18 optional bytes some_bytes = 2; | 18 optional bytes some_bytes = 2; |
19 bytes fixed_bytes[24] = 3; | 19 bytes fixed_bytes[24] = 3; |
20 } | 20 } |
OLD | NEW |