2005-03-09 Mike Kestner <mkestner@novell.com>
* glib/Marshaller.cs : add IntPtr.Zero guarding. svn path=/trunk/gtk-sharp/; revision=41607
This commit is contained in:
parent
9160dec10e
commit
ae7d9dfbf9
2 changed files with 7 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
2005-03-09 Mike Kestner <mkestner@novell.com>
|
||||
|
||||
* glib/Marshaller.cs : add IntPtr.Zero guarding.
|
||||
|
||||
2005-03-09 Alexandre Gomes <alexmipego@hotmail.com>
|
||||
|
||||
* gtk/Gtk.metadata: Set GetVisibleRect param to be passed as out.
|
||||
|
|
|
@ -42,6 +42,9 @@ namespace GLib {
|
|||
|
||||
public static string Utf8PtrToString (IntPtr ptr)
|
||||
{
|
||||
if (ptr == IntPtr.Zero)
|
||||
return null;
|
||||
|
||||
int len = (int) g_utf8_strlen (ptr, -1);
|
||||
byte[] bytes = new byte [len];
|
||||
Marshal.Copy (ptr, bytes, 0, len);
|
||||
|
|
Loading…
Reference in a new issue