Skip to content

Commit b17d7e7

Browse files
committed
Remove references to IValueEquality
1 parent e1a556c commit b17d7e7

2 files changed

Lines changed: 5 additions & 13 deletions

File tree

Src/IronPython/Runtime/PythonFunction.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -536,12 +536,8 @@ private string GetContentsRepr() {
536536

537537
#endregion
538538

539-
#region IValueEquality Members
540-
541539
public const object __hash__ = null;
542540

543-
#endregion
544-
545541
[Python3Warning("cell comparisons not supported in 3.x")]
546542
public int __cmp__(object other) {
547543
if (!(other is ClosureCell cc)) throw PythonOps.TypeError("cell.__cmp__(x,y) expected cell, got {0}", PythonTypeOps.GetName(other));

Src/IronPython/Runtime/Types/PythonTypeInfo.cs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -276,9 +276,7 @@ private class ObjectResolver : StandardResolver {
276276
}
277277

278278
/// <summary>
279-
/// Resolves methods mapped to __eq__ and __ne__ from:
280-
/// 1. IStructuralEquatable.Equals
281-
/// 2. IValueEquality.Equals (CLR2 only)
279+
/// Resolves methods mapped to __eq__ and __ne__ from IStructuralEquatable.Equals
282280
/// </summary>
283281
private class EqualityResolver : MemberResolver {
284282
public static readonly EqualityResolver Instance = new EqualityResolver();
@@ -647,10 +645,9 @@ private class ProtectedMemberResolver : MemberResolver {
647645
#endif
648646

649647
// Runs after StandardResolver so custom __eq__ methods can be added
650-
// that support things like returning NotImplemented vs. IValueEquality
651-
// which only supports true/false. Runs before OperatorResolver so that
652-
// IStructuralEquatable and IValueEquality take precedence over Equals,
653-
// which can be provided for nice .NET interop.
648+
// that support things like returning NotImplemented. Runs before
649+
// OperatorResolver so that IStructuralEquatable take precedence
650+
// over Equals, which can be provided for nice .NET interop.
654651

655652
EqualityResolver.Instance,
656653
new ComparisonResolver(typeof(IStructuralComparable), "StructuralComparable"),
@@ -878,8 +875,7 @@ private static bool TypeOverridesMethod(MemberBinder/*!*/ binder, Type/*!*/ typ
878875
}
879876

880877
/// <summary>
881-
/// Provides a resolution for __hash__, first looking for IStructuralEquatable.GetHashCode,
882-
/// then IValueEquality.GetValueHashCode.
878+
/// Provides a resolution for __hash__ looking for IStructuralEquatable.GetHashCode.
883879
/// </summary>
884880
private static MemberGroup/*!*/ HashResolver(MemberBinder/*!*/ binder, Type/*!*/ type) {
885881
if (typeof(IStructuralEquatable).IsAssignableFrom(type) && !type.IsInterface) {

0 commit comments

Comments
 (0)