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

fix threads to actually return a voidptr

This commit is contained in:
Nicolas Sauzede 2019-11-08 01:09:02 +01:00 committed by Alexander Medvednikov
parent 5a8c3daba3
commit db4a7edf3a

View File

@ -646,7 +646,7 @@ fn (p mut Parser) async_fn_call(f Fn, method_ph int, receiver_var, receiver_type
if p.os == .windows { if p.os == .windows {
wrapper_type = 'void* __stdcall' wrapper_type = 'void* __stdcall'
} }
wrapper_text := '$wrapper_type $wrapper_name($arg_struct_name * arg) {$fn_name( /*f*/$str_args ); }' wrapper_text := '$wrapper_type $wrapper_name($arg_struct_name * arg) {$fn_name( /*f*/$str_args ); return NULL; }'
p.cgen.register_thread_fn(wrapper_name, wrapper_text, arg_struct) p.cgen.register_thread_fn(wrapper_name, wrapper_text, arg_struct)
// Create thread object // Create thread object
tmp_nr := p.get_tmp_counter() tmp_nr := p.get_tmp_counter()