fix interfaces on msvc

pull/2705/head
Alexander Medvednikov 2019-11-08 23:28:32 +03:00
parent cac719c078
commit 32fec2c26c
1 changed files with 3 additions and 0 deletions

View File

@ -410,6 +410,9 @@ fn (v &V) interface_table() string {
// Speaker_Cat_index = 0 // Speaker_Cat_index = 0
sb.writeln('int _${t.name}_${gen_type}_index = $i;') sb.writeln('int _${t.name}_${gen_type}_index = $i;')
} }
if t.methods.len == 0 {
methods = '{TCCSKIP(0)}'
}
sb.writeln('void* (* ${t.name}_name_table[][$t.methods.len]) = ' + sb.writeln('void* (* ${t.name}_name_table[][$t.methods.len]) = ' +
'{ $methods }; ') '{ $methods }; ')
continue continue