From e9b3f84684c591d1440c698251b71fc08ac0e1a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Prei=C3=9Fer?= Date: Wed, 3 May 2023 18:42:20 +0200 Subject: [PATCH] Update definition of `wasmtime_func_call_unchecked`. (#245) * Update definition of wasmtime_func_call_unchecked. See bytecodealliance/wasmtime#6262 Fixes #244 * Empty commit to retrigger CI. --- src/Function.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Function.cs b/src/Function.cs index 3025616..333a220 100644 --- a/src/Function.cs +++ b/src/Function.cs @@ -416,7 +416,7 @@ private unsafe IntPtr Invoke(Span argumentsAndResults, StoreContext st IntPtr trap; fixed (ValueRaw* argsAndResultsPtr = argumentsAndResults) { - error = Native.wasmtime_func_call_unchecked(storeContext.handle, func, argsAndResultsPtr, out trap); + error = Native.wasmtime_func_call_unchecked(storeContext.handle, func, argsAndResultsPtr, (nuint)argumentsAndResults.Length, out trap); // See comments above for the two reasons why the `Store` must be kept alive here. GC.KeepAlive(store); @@ -718,7 +718,7 @@ internal static class Native public static unsafe extern IntPtr wasmtime_func_call(IntPtr context, in ExternFunc func, Value* args, nuint nargs, Value* results, nuint nresults, out IntPtr trap); [DllImport(Engine.LibraryName)] - public static unsafe extern IntPtr wasmtime_func_call_unchecked(IntPtr context, in ExternFunc func, ValueRaw* args_and_results, out IntPtr trap); + public static unsafe extern IntPtr wasmtime_func_call_unchecked(IntPtr context, in ExternFunc func, ValueRaw* args_and_results, nuint args_and_results_len, out IntPtr trap); [DllImport(Engine.LibraryName)] public static extern IntPtr wasmtime_func_type(IntPtr context, in ExternFunc func);