[Mono-devel-list] Removing GetHashCode and Equal from System.AppDomain and System.OperatingSystem
Paolo Molaro
lupus at ximian.com
Thu Jul 24 09:05:52 EDT 2003
On 07/23/03 Duncan Mak wrote:
> Index: System/OperatingSystem.cs
> ===================================================================
> RCS file: /cvs/public/mcs/class/corlib/System/OperatingSystem.cs,v
> retrieving revision 1.8
> diff -u -p -r1.8 OperatingSystem.cs
> --- System/OperatingSystem.cs 1 Apr 2002 20:22:36 -0000 1.8
> +++ System/OperatingSystem.cs 24 Jul 2003 03:40:47 -0000
> @@ -67,22 +67,22 @@ namespace System
> /// <summary>
> /// Return true if obj equals this object
> /// </summary>
> - public override bool Equals(object obj)
[...]
> - public override int GetHashCode()
I would leave the methods in OperatingSystem, the refernece compare done
by the Object methods would be incorrect for our implementation.
> Index: System/AppDomain.cs
> ===================================================================
> RCS file: /cvs/public/mcs/class/corlib/System/AppDomain.cs,v
> retrieving revision 1.41
> diff -u -p -r1.41 AppDomain.cs
> --- System/AppDomain.cs 13 May 2003 22:27:51 -0000 1.41
> +++ System/AppDomain.cs 24 Jul 2003 03:40:47 -0000
> @@ -409,13 +409,13 @@ namespace System {
> theDelegate ();
> }
>
> - public override bool Equals (object other)
[...]
> - public override int GetHashCode ()
Just remove the methods here.
> Index: System.Reflection.Emit/OpCodes.cs
> ===================================================================
> RCS file: /cvs/public/mcs/class/corlib/System.Reflection.Emit/OpCodes.cs,v
> retrieving revision 1.3
> diff -u -p -r1.3 OpCodes.cs
> --- System.Reflection.Emit/OpCodes.cs 8 May 2002 13:21:11 -0000 1.3
> +++ System.Reflection.Emit/OpCodes.cs 24 Jul 2003 03:40:47 -0000
> @@ -36,7 +36,7 @@ namespace System.Reflection.Emit {
> public static readonly OpCode Bne_Un;
> public static readonly OpCode Bne_Un_S;
> public static readonly OpCode Box;
> - public static readonly OpCode Boxval;
> +// public static readonly OpCode Boxval;
Did you compile after the change? You'd also need to remove the line
where Boxval is assigned to. Though I don't know of any user of this
opcode, the .net 1.0 framework has it (it's the same as Box). They
have it marked with the Obsolete attribute and we probably should do the
same.
Thanks.
lupus
--
-----------------------------------------------------------------
lupus at debian.org debian/rules
lupus at ximian.com Monkeys do it better
More information about the Mono-devel-list
mailing list