[glib] Fix g_filename_to_utf8 signature for 64 bits platforms
This commit is contained in:
parent
75a3c2b652
commit
7391aac88d
1 changed files with 2 additions and 3 deletions
|
@ -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<d_g_filename_to_utf8>(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);
|
||||
|
|
Loading…
Reference in a new issue