2002-10-20 Miguel de Icaza <miguel@ximian.com>

* glib/Object.cs: Avoid recursive calls with the previous operator
	!= and operator ==

svn path=/trunk/gtk-sharp/; revision=8418
This commit is contained in:
Miguel de Icaza 2002-10-20 07:16:22 +00:00
parent f94df39a18
commit f95bf9dbbd
2 changed files with 33 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2002-10-20 Miguel de Icaza <miguel@ximian.com>
* glib/Object.cs: Avoid recursive calls with the previous operator
!= and operator ==
2002-10-19 Duncan Mak <duncan@ximian.com>
* glib/Source.cs: Added.

View file

@ -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);
}
}
/// <summary>