Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
felipensp committed Jul 2, 2023
1 parent 049d685 commit 548289f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion vlib/v/gen/c/struct.v
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ fn (mut g Gen) struct_init(node ast.StructInit) {
g.empty_line = false
g.write(s)
}
styp := g.typ(g.table.unaliased_type(node.typ)).replace('*', '')
unalised_typ := g.table.unaliased_type(node.typ)
styp := if g.table.sym(unalised_typ).language == .v {
g.typ(unalised_typ).replace('*', '')
} else {
g.typ(node.typ)
}
mut shared_styp := '' // only needed for shared x := St{...
if styp in c.skip_struct_init {
// needed for c++ compilers
Expand Down

0 comments on commit 548289f

Please sign in to comment.