[glib] Fix g_filename_from_utf8
signature for 64 bits platforms
Fixes https://github.com/GtkSharp/GtkSharp/issues/345
This commit is contained in:
parent
451755439e
commit
75a3c2b652
1 changed files with 2 additions and 3 deletions
|
@ -117,7 +117,7 @@ namespace GLib {
|
|||
return ret;
|
||||
}
|
||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||
delegate IntPtr d_g_filename_from_utf8(IntPtr mem, int len, IntPtr read, out IntPtr written, out IntPtr error);
|
||||
delegate IntPtr d_g_filename_from_utf8(IntPtr mem, IntPtr len, IntPtr read, out IntPtr written, out IntPtr error);
|
||||
static d_g_filename_from_utf8 g_filename_from_utf8 = FuncLoader.LoadFunction<d_g_filename_from_utf8>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_filename_from_utf8"));
|
||||
|
||||
public static IntPtr StringToFilenamePtr (string str)
|
||||
|
@ -125,9 +125,8 @@ namespace GLib {
|
|||
if (str == null)
|
||||
return IntPtr.Zero;
|
||||
|
||||
IntPtr dummy, error;
|
||||
IntPtr utf8 = StringToPtrGStrdup (str);
|
||||
IntPtr result = g_filename_from_utf8 (utf8, -1, IntPtr.Zero, out dummy, out error);
|
||||
IntPtr result = g_filename_from_utf8 (utf8, (IntPtr)(-1), IntPtr.Zero, out _, out var error);
|
||||
|
||||
g_free (utf8);
|
||||
if (error != IntPtr.Zero)
|
||||
|
|
Loading…
Reference in a new issue