From f95bf9dbbdf72e1776e2672903d2af73b41df649 Mon Sep 17 00:00:00 2001 From: Miguel de Icaza Date: Sun, 20 Oct 2002 07:16:22 +0000 Subject: [PATCH] 2002-10-20 Miguel de Icaza * glib/Object.cs: Avoid recursive calls with the previous operator != and operator == svn path=/trunk/gtk-sharp/; revision=8418 --- ChangeLog | 5 +++++ glib/Object.cs | 30 ++++++++++++++++++++++++++++-- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 386fd244e..1eaa0f333 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-10-20 Miguel de Icaza + + * glib/Object.cs: Avoid recursive calls with the previous operator + != and operator == + 2002-10-19 Duncan Mak * glib/Source.cs: Added. diff --git a/glib/Object.cs b/glib/Object.cs index 0598106de..7f17bf5e9 100644 --- a/glib/Object.cs +++ b/glib/Object.cs @@ -218,12 +218,38 @@ namespace GLib { public static bool operator == (Object a, Object b) { - return a.Equals (b); + object oa = a; + object ob = b; + + if (ob == null){ + if (oa == null) + return true; + else + return false; + } else { + if (oa == null) + return false; + else + return a.Equals (b); + } } public static bool operator != (Object a, Object b) { - return !a.Equals (b); + object oa = a; + object ob = b; + + if (ob == null){ + if (oa == null) + return false; + else + return true; + } else { + if (oa == null) + return true; + else + return !a.Equals (b); + } } ///