cgen: fix gohandle_name generation (use .cname)

pull/8704/head
Delyan Angelov 2021-02-09 12:54:58 +02:00
parent 1bb4be17d8
commit 3d2afcf02e
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
1 changed files with 1 additions and 1 deletions

View File

@ -5926,7 +5926,7 @@ fn (mut g Gen) go_stmt(node ast.GoStmt, joinable bool) string {
g.writeln('$arg_tmp_var->ret_ptr = malloc(sizeof($s_ret_typ));')
}
gohandle_name := 'gohandle_' +
g.table.get_type_symbol(g.unwrap_generic(node.call_expr.return_type)).name
g.table.get_type_symbol(g.unwrap_generic(node.call_expr.return_type)).cname
if g.pref.os == .windows {
simple_handle := if joinable && node.call_expr.return_type != table.void_type {
'thread_handle_$tmp'