mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-09-09 00:13:20 +02:00
2008-04-15 Mike Kestner <mkestner@novell.com>
* glib/Marshaller.cs: marshal null string arrays as a null IntPtr[]. [Fixes #378514] svn path=/trunk/gtk-sharp/; revision=100744
This commit is contained in:
parent
def947943a
commit
772790dcb0
@ -1,3 +1,8 @@
|
|||||||
|
2008-04-15 Mike Kestner <mkestner@novell.com>
|
||||||
|
|
||||||
|
* glib/Marshaller.cs: marshal null string arrays as a null IntPtr[].
|
||||||
|
[Fixes #378514]
|
||||||
|
|
||||||
2008-04-14 Mike Kestner <mkestner@novell.com>
|
2008-04-14 Mike Kestner <mkestner@novell.com>
|
||||||
|
|
||||||
* gtk/Application.cs: add QuitPrepare event for Gnome.Program usage.
|
* gtk/Application.cs: add QuitPrepare event for Gnome.Program usage.
|
||||||
|
@ -39,6 +39,9 @@ namespace GLib {
|
|||||||
|
|
||||||
public static void Free (IntPtr[] ptrs)
|
public static void Free (IntPtr[] ptrs)
|
||||||
{
|
{
|
||||||
|
if (ptrs == null)
|
||||||
|
return;
|
||||||
|
|
||||||
for (int i = 0; i < ptrs.Length; i++)
|
for (int i = 0; i < ptrs.Length; i++)
|
||||||
g_free (ptrs [i]);
|
g_free (ptrs [i]);
|
||||||
}
|
}
|
||||||
@ -142,7 +145,7 @@ namespace GLib {
|
|||||||
public static IntPtr[] StringArrayToNullTermPointer (string[] strs)
|
public static IntPtr[] StringArrayToNullTermPointer (string[] strs)
|
||||||
{
|
{
|
||||||
if (strs == null)
|
if (strs == null)
|
||||||
return new IntPtr [0];
|
return null;
|
||||||
IntPtr[] result = new IntPtr [strs.Length + 1];
|
IntPtr[] result = new IntPtr [strs.Length + 1];
|
||||||
for (int i = 0; i < strs.Length; i++)
|
for (int i = 0; i < strs.Length; i++)
|
||||||
result [i] = StringToPtrGStrdup (strs [i]);
|
result [i] = StringToPtrGStrdup (strs [i]);
|
||||||
|
Loading…
Reference in New Issue
Block a user