Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
v
/
tests
/
project_with_c_code_2
/
main.v
14
lines
·
12
sloc
·
251 bytes
·
4a10514081939b08917684d06df3c47e3f359fc1
Raw
1
module
main
2
3
import
v.tests.project_with_c_code_2.modc
4
5
// passing array of Vtype to C
6
// Vtype wraps a C type
7
fn
main() {
8
a := [1, 2, 3, 4]
9
mut
vals := []modc.Vtype{}
10
for
v
in
a {
11
vals << modc.new_vtype(v)
12
}
13
modc.call_with_array_param(vals)
14
}
15