@@ -23,9 +23,9 @@ public SwiftComparableProxy (ISwiftExistentialContainer container)
23
23
24
24
struct Comparable_xam_vtable {
25
25
[ MarshalAs ( UnmanagedType . FunctionPtr ) ]
26
- public unsafe delegate * unmanaged< IntPtr , IntPtr , bool > opEqualFunc ;
26
+ public unsafe delegate * unmanaged< IntPtr , IntPtr , int > opEqualFunc ;
27
27
[ MarshalAs ( UnmanagedType . FunctionPtr ) ]
28
- public unsafe delegate * unmanaged< IntPtr , IntPtr , bool > opLessFunc ;
28
+ public unsafe delegate * unmanaged< IntPtr , IntPtr , int > opLessFunc ;
29
29
}
30
30
31
31
static Comparable_xam_vtable vtableIComparable ;
@@ -34,24 +34,24 @@ static SwiftComparableProxy ()
34
34
XamSetVTable ( ) ;
35
35
}
36
36
37
- [ UnmanagedCallersOnly ]
38
- static bool EqFunc ( IntPtr oneptr , IntPtr twoptr )
37
+ [ UnmanagedCallersOnly ]
38
+ static int EqFunc ( IntPtr oneptr , IntPtr twoptr )
39
39
{
40
40
if ( oneptr == twoptr )
41
- return true ;
41
+ return 1 ;
42
42
var one = SwiftObjectRegistry . Registry . ProxyForEveryProtocolHandle < ISwiftComparable > ( oneptr ) ;
43
43
var two = SwiftObjectRegistry . Registry . ProxyForEveryProtocolHandle < ISwiftComparable > ( twoptr ) ;
44
- return one . OpEquals ( two ) ;
44
+ return one . OpEquals ( two ) ? 1 : 0 ;
45
45
}
46
46
47
47
[ UnmanagedCallersOnly ]
48
- static bool LessFunc ( IntPtr oneptr , IntPtr twoptr )
48
+ static int LessFunc ( IntPtr oneptr , IntPtr twoptr )
49
49
{
50
50
if ( oneptr == twoptr )
51
- return false ;
51
+ return 0 ;
52
52
var one = SwiftObjectRegistry . Registry . ProxyForEveryProtocolHandle < ISwiftComparable > ( oneptr ) ;
53
53
var two = SwiftObjectRegistry . Registry . ProxyForEveryProtocolHandle < ISwiftComparable > ( twoptr ) ;
54
- return one . OpLess ( two ) ;
54
+ return one . OpLess ( two ) ? 1 : 0 ;
55
55
}
56
56
57
57
static void XamSetVTable ( )
0 commit comments