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:
parent
f94df39a18
commit
f95bf9dbbd
2 changed files with 33 additions and 2 deletions
|
@ -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.
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue