From 88d38246f5e42f3e6a91f029252f9751a38ed5d2 Mon Sep 17 00:00:00 2001 From: Miguel de Icaza Date: Sat, 19 Oct 2002 20:03:51 +0000 Subject: [PATCH] 2002-10-19 Miguel de Icaza * glib/Object.cs: Added operator != and operator == overloads. svn path=/trunk/gtk-sharp/; revision=8400 --- ChangeLog | 4 ++++ glib/Object.cs | 12 +++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 71fd108b9..15cdf70f5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2002-10-19 Miguel de Icaza + + * glib/Object.cs: Added operator != and operator == overloads. + 2002-10-19 Rachel Hestilow * gconf, sample/gconf: Added. diff --git a/glib/Object.cs b/glib/Object.cs index 05f27e08d..97e23d8ca 100644 --- a/glib/Object.cs +++ b/glib/Object.cs @@ -62,7 +62,7 @@ namespace GLib { return; GC.SuppressFinalize (this); - g_object_unref (_obj); + //g_object_unref (_obj); _obj = IntPtr.Zero; } @@ -216,6 +216,16 @@ namespace GLib { return (Handle == ((Object) o).Handle); } + public static bool operator == (Object a, Object b) + { + return a.Equals (b); + } + + public static bool operator != (Object a, Object b) + { + return !a.Equals (b); + } + /// /// GetHashCode Method ///