GtkSharp/glib/GException.cs
Vladimir Vukicevic f0f44bf010 * glib/GException.cs: g_clear_error takes
a GError **, not a GError *.  Added refs to get the **.

svn path=/trunk/gtk-sharp/; revision=8026
2002-10-06 02:12:04 +00:00

37 lines
678 B
C#

// GException.cs : GError handling
//
// Authors: Rachel Hestilow <hestilow@ximian.com>
//
// (c) 2002 Rachel Hestilow
namespace GLib {
using System;
using System.Runtime.InteropServices;
public class GException : Exception
{
IntPtr errptr;
public GException (IntPtr errptr) : base ()
{
this.errptr = errptr;
}
[DllImport("gtksharpglue")]
static extern string gtksharp_error_get_message (IntPtr errptr);
public override string Message {
get {
return gtksharp_error_get_message (errptr);
}
}
[DllImport("glib-2.0")]
static extern void g_clear_error (ref IntPtr errptr);
~GException ()
{
g_clear_error (ref errptr);
}
}
}