From 7391aac88d232e2d03e95c836a7618daae146d2c Mon Sep 17 00:00:00 2001 From: Sebastien Pouliot Date: Fri, 22 Apr 2022 21:01:12 -0400 Subject: [PATCH] [glib] Fix g_filename_to_utf8 signature for 64 bits platforms --- Source/Libs/GLibSharp/Marshaller.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Source/Libs/GLibSharp/Marshaller.cs b/Source/Libs/GLibSharp/Marshaller.cs index 3603a50d9..bb70434da 100644 --- a/Source/Libs/GLibSharp/Marshaller.cs +++ b/Source/Libs/GLibSharp/Marshaller.cs @@ -48,15 +48,14 @@ namespace GLib { g_free (ptrs [i]); } [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - delegate IntPtr d_g_filename_to_utf8(IntPtr mem, int len, IntPtr read, out IntPtr written, out IntPtr error); + delegate IntPtr d_g_filename_to_utf8(IntPtr mem, IntPtr len, IntPtr read, out IntPtr written, out IntPtr error); static d_g_filename_to_utf8 g_filename_to_utf8 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_filename_to_utf8")); public static string FilenamePtrToString (IntPtr ptr) { if (ptr == IntPtr.Zero) return null; - IntPtr dummy, error; - IntPtr utf8 = g_filename_to_utf8 (ptr, -1, IntPtr.Zero, out dummy, out error); + IntPtr utf8 = g_filename_to_utf8 (ptr, (IntPtr)(-1), IntPtr.Zero, out _, out var error); if (error != IntPtr.Zero) throw new GLib.GException (error);