From db4a7edf3ab48e301a7e6c425695d802e2a8d04b Mon Sep 17 00:00:00 2001 From: Nicolas Sauzede Date: Fri, 8 Nov 2019 01:09:02 +0100 Subject: [PATCH] fix threads to actually return a voidptr --- vlib/compiler/fn.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/compiler/fn.v b/vlib/compiler/fn.v index 78c1ab900e..eda4a0030e 100644 --- a/vlib/compiler/fn.v +++ b/vlib/compiler/fn.v @@ -646,7 +646,7 @@ fn (p mut Parser) async_fn_call(f Fn, method_ph int, receiver_var, receiver_type if p.os == .windows { 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) // Create thread object tmp_nr := p.get_tmp_counter()