@@ -20,7 +20,7 @@ public int Count
2020 Runtime . CheckExceptionOccurred ( ) ;
2121 }
2222
23- return ( int ) size ;
23+ return checked ( ( int ) size ) ;
2424 }
2525 }
2626
@@ -38,7 +38,7 @@ public void Clear()
3838 {
3939 if ( IsReadOnly )
4040 throw new NotImplementedException ( ) ;
41- var result = Runtime . PySequence_DelSlice ( pyObject . Handle , 0 , Count ) ;
41+ int result = Runtime . PySequence_DelSlice ( pyObject , 0 , Count ) ;
4242 if ( result == - 1 )
4343 {
4444 Runtime . CheckExceptionOccurred ( ) ;
@@ -49,7 +49,7 @@ public bool Contains(T item)
4949 {
5050 //not sure if IEquatable is implemented and this will work!
5151 foreach ( var element in this )
52- if ( element . Equals ( item ) ) return true ;
52+ if ( object . Equals ( element , item ) ) return true ;
5353
5454 return false ;
5555 }
@@ -77,7 +77,7 @@ protected bool removeAt(int index)
7777 if ( index >= Count || index < 0 )
7878 return false ;
7979
80- var result = Runtime . PySequence_DelItem ( pyObject . Handle , index ) ;
80+ int result = Runtime . PySequence_DelItem ( pyObject , index ) ;
8181
8282 if ( result == 0 )
8383 return true ;
@@ -91,7 +91,7 @@ protected int indexOf(T item)
9191 var index = 0 ;
9292 foreach ( var element in this )
9393 {
94- if ( element . Equals ( item ) ) return index ;
94+ if ( object . Equals ( element , item ) ) return index ;
9595 index ++ ;
9696 }
9797
0 commit comments