1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

cgen: cleanup Gen.cc_type (#11357)

This commit is contained in:
Enzo 2021-08-31 22:55:37 +02:00 committed by GitHub
parent 1b262c4f1d
commit d1974f500f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -794,18 +794,9 @@ fn (mut g Gen) cc_type(typ ast.Type, is_prefix_struct bool) string {
styp += sgtyps
}
}
ast.MultiReturn {
// TODO: this doesn't belong here, but makes it working for now
mut cname := 'multi_return'
for mr_typ in sym.info.types {
mr_type_sym := g.table.get_type_symbol(g.unwrap_generic(mr_typ))
cname += '_$mr_type_sym.cname'
}
return cname
}
else {}
}
if is_prefix_struct && styp.starts_with('C__') {
if is_prefix_struct && sym.language == .c {
styp = styp[3..]
if sym.kind == .struct_ {
info := sym.info as ast.Struct