Skip to content

Commit 92ff024

Browse files
[wasm] Fix typedef for non-void interp entry callbacks (#59990)
For UnmanagedCallersOnly methods that return non-void, pass the address of the return variable to the interp entry method. Co-authored-by: Aleksey Kliger <alklig@microsoft.com>
1 parent a1c550c commit 92ff024

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tasks/WasmAppBuilder/PInvokeTableGenerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ private void EmitNativeToInterp(StreamWriter w, List<PInvokeCallback> callbacks)
326326
sb.Append($" (*WasmInterpEntrySig_{cb_index}) (");
327327
int pindex = 0;
328328
if (method.ReturnType.Name != "Void") {
329-
sb.Append("int");
329+
sb.Append("int*");
330330
pindex++;
331331
}
332332
foreach (var p in method.GetParameters()) {

0 commit comments

Comments
 (0)