v2 / vlib / v / tests / c_structs / cstruct.h
35 lines · 25 sloc · 329 bytes · fd144b30f268bbca57e543b2ac746782b67b37f8
Raw
1
2struct Abc {
3 int field;
4};
5
6typedef struct Test2 {
7 int a;
8} Test2;
9
10typedef struct Test1 {
11 Test2 a;
12} Test1;
13
14/////
15
16typedef struct MyCStruct {
17 char* data;
18} MyCStruct;
19
20/////
21
22typedef struct Foo {
23 int a;
24} Foo;
25
26typedef struct Bar {
27 int a;
28 float b;
29} Bar;
30
31///
32
33typedef struct TestAlias {
34 int a;
35};
36