1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

cgen: fix gohandle_name generation (use .cname)

This commit is contained in:
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

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));') g.writeln('$arg_tmp_var->ret_ptr = malloc(sizeof($s_ret_typ));')
} }
gohandle_name := 'gohandle_' + 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 { if g.pref.os == .windows {
simple_handle := if joinable && node.call_expr.return_type != table.void_type { simple_handle := if joinable && node.call_expr.return_type != table.void_type {
'thread_handle_$tmp' 'thread_handle_$tmp'