* fixed generating wrappers for suspending functions that return something, other than double

This commit is contained in:
Nikolay Nikolov 2023-06-11 16:50:49 +03:00
parent 15c95e0ac7
commit c22b6c10b7

View File

@ -932,7 +932,10 @@ implementation
addvisibleparameterdeclarations(str,pd);
if str[Length(str)]=';' then
delete(str,Length(str),1);
str:=str+'): double; external '''+pd.import_dll^+ ''' name '''+pd.import_name^+''';';
str:=str+')';
if not is_void(pd.returndef) then
str:=str+': '+pd.returndef.fulltypename;
str:=str+'; external '''+pd.import_dll^+ ''' name '''+pd.import_name^+''';';
str_parse_method_impl(str,nil,false);
str:='var __fpc_wasm_suspender_copy:WasmExternRef; begin __fpc_wasm_suspender_copy:=__fpc_wasm_suspender; ';