diff options
Diffstat (limited to 'v_windows/v/vlib/v/tests/project_with_c_code/mod1/wrapper.v')
-rw-r--r-- | v_windows/v/vlib/v/tests/project_with_c_code/mod1/wrapper.v | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/v_windows/v/vlib/v/tests/project_with_c_code/mod1/wrapper.v b/v_windows/v/vlib/v/tests/project_with_c_code/mod1/wrapper.v new file mode 100644 index 0000000..f02233f --- /dev/null +++ b/v_windows/v/vlib/v/tests/project_with_c_code/mod1/wrapper.v @@ -0,0 +1,17 @@ +module mod1 + +#flag -I @VMODROOT/c +#flag @VMODROOT/c/implementation.o + +#include "header.h" + +struct C.MyStruct { + UppercaseField int +} + +fn C.cadd(int, int) int + +pub fn vadd(a int, b int) int { + x := C.MyStruct{100} + return 900 + x.UppercaseField + C.cadd(a, b) +} |