| 1 | module mod1 |
| 2 | |
| 3 | #flag -I @VMODROOT/mod1/c |
| 4 | #flag @VMODROOT/mod1/c/implementation.o |
| 5 | |
| 6 | #include "header.h" |
| 7 | |
| 8 | pub struct C.MyStruct { |
| 9 | UppercaseField int |
| 10 | } |
| 11 | |
| 12 | fn C.cadd(i32, i32) i32 |
| 13 | |
| 14 | pub fn vadd(a int, b int) int { |
| 15 | x := C.MyStruct{100} |
| 16 | return 900 + x.UppercaseField + C.cadd(a, b) |
| 17 | } |
| 18 |