mirror of
https://github.com/vlang/v.git
synced 2025-09-15 23:42:28 +03:00
cgen: ensure struct has empty_struct_declaration to appease msvc
This commit is contained in:
parent
684a443b08
commit
19c3ba2f8f
1 changed files with 7 additions and 3 deletions
|
@ -3733,9 +3733,13 @@ fn (mut g Gen) go_stmt(node ast.GoStmt) {
|
||||||
styp := g.typ(it.receiver_type)
|
styp := g.typ(it.receiver_type)
|
||||||
g.type_definitions.writeln('\t$styp arg0;')
|
g.type_definitions.writeln('\t$styp arg0;')
|
||||||
}
|
}
|
||||||
for i, arg in it.args {
|
if it.args.len == 0 {
|
||||||
styp := g.typ(arg.typ)
|
g.type_definitions.writeln('EMPTY_STRUCT_DECLARATION;')
|
||||||
g.type_definitions.writeln('\t$styp arg${i+1};')
|
} else {
|
||||||
|
for i, arg in it.args {
|
||||||
|
styp := g.typ(arg.typ)
|
||||||
|
g.type_definitions.writeln('\t$styp arg${i+1};')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
g.type_definitions.writeln('} $wrapper_struct_name;')
|
g.type_definitions.writeln('} $wrapper_struct_name;')
|
||||||
g.type_definitions.writeln('void* ${wrapper_fn_name}($wrapper_struct_name *arg);')
|
g.type_definitions.writeln('void* ${wrapper_fn_name}($wrapper_struct_name *arg);')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue