cgen: another imported interface fix

pull/4663/head
Alexander Medvednikov 2020-04-30 18:23:17 +02:00
parent f1903f3c1f
commit 250dea7bd1
1 changed files with 2 additions and 2 deletions

View File

@ -2272,7 +2272,7 @@ int typ;
g.definitions.writeln('typedef struct {')
g.definitions.writeln('\tvoid* _object;')
g.definitions.writeln('\tint _interface_idx;')
g.definitions.writeln('} $typ.name;')
g.definitions.writeln('} $name;')
}
else {}
}
@ -3315,7 +3315,7 @@ fn (v &Gen) interface_table() string {
info := t.info as table.Interface
println(info.gen_types)
// interface_name is for example Speaker
interface_name := t.name
interface_name := t.name.replace('.', '__')
mut methods := ''
mut generated_casting_functions := ''
sb.writeln('// NR gen_types= $info.gen_types.len')