cgen: use typ() for array type
parent
145b125155
commit
748b1d3381
|
@ -3216,8 +3216,8 @@ fn c_name(name_ string) string {
|
||||||
fn (g Gen) type_default(typ table.Type) string {
|
fn (g Gen) type_default(typ table.Type) string {
|
||||||
sym := g.table.get_type_symbol(typ)
|
sym := g.table.get_type_symbol(typ)
|
||||||
if sym.kind == .array {
|
if sym.kind == .array {
|
||||||
elem_sym := g.table.get_type_symbol(sym.array_info().elem_type)
|
elem_sym := g.typ(sym.array_info().elem_type)
|
||||||
mut elem_type_str := elem_sym.name.replace('.', '__')
|
mut elem_type_str := elem_sym.replace('.', '__')
|
||||||
if elem_type_str.starts_with('C__') {
|
if elem_type_str.starts_with('C__') {
|
||||||
elem_type_str = elem_type_str[3..]
|
elem_type_str = elem_type_str[3..]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue