cgen: cleanup `Gen.cc_type` (#11357)

pull/11384/head
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
1 changed files with 1 additions and 10 deletions

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