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:
Mike Kestner 2008-04-15 17:43:55 +00:00
parent def947943a
commit 772790dcb0
2 changed files with 9 additions and 1 deletions

View file

@ -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>
* gtk/Application.cs: add QuitPrepare event for Gnome.Program usage.

View file

@ -39,6 +39,9 @@ namespace GLib {
public static void Free (IntPtr[] ptrs)
{
if (ptrs == null)
return;
for (int i = 0; i < ptrs.Length; i++)
g_free (ptrs [i]);
}
@ -142,7 +145,7 @@ namespace GLib {
public static IntPtr[] StringArrayToNullTermPointer (string[] strs)
{
if (strs == null)
return new IntPtr [0];
return null;
IntPtr[] result = new IntPtr [strs.Length + 1];
for (int i = 0; i < strs.Length; i++)
result [i] = StringToPtrGStrdup (strs [i]);