File tree 8 files changed +18
-25
lines changed 8 files changed +18
-25
lines changed Original file line number Diff line number Diff line change @@ -44,9 +44,10 @@ class DynamicLibrary {
44
44
int getHandle () native "Ffi_dl_getHandle" ;
45
45
46
46
@patch
47
- bool operator == (other) {
48
- if (other == null ) return false ;
49
- return getHandle () == other.getHandle ();
47
+ bool operator == (Object other) {
48
+ if (other is ! DynamicLibrary ) return false ;
49
+ DynamicLibrary otherLib = other;
50
+ return getHandle () == otherLib.getHandle ();
50
51
}
51
52
52
53
@patch
Original file line number Diff line number Diff line change 2
2
// for details. All rights reserved. Use of this source code is governed by a
3
3
// BSD-style license that can be found in the LICENSE file.
4
4
5
- // @dart = 2.5
6
-
7
5
part of dart.ffi;
8
6
9
7
class DartRepresentationOf {
Original file line number Diff line number Diff line change 2
2
// for details. All rights reserved. Use of this source code is governed by a
3
3
// BSD-style license that can be found in the LICENSE file.
4
4
5
- // @dart = 2.5
6
-
7
5
part of dart.ffi;
8
6
9
7
/// Represents a dynamically loaded C library.
@@ -35,7 +33,7 @@ class DynamicLibrary {
35
33
String symbolName);
36
34
37
35
/// Dynamic libraries are equal if they load the same library.
38
- external bool operator == (other);
36
+ external bool operator == (Object other);
39
37
40
38
/// The hash code for a DynamicLibrary only depends on the loaded library
41
39
external int get hashCode;
Original file line number Diff line number Diff line change 2
2
// for details. All rights reserved. Use of this source code is governed by a
3
3
// BSD-style license that can be found in the LICENSE file
4
4
5
- // @dart = 2.5
6
-
7
5
/**
8
6
* Foreign Function Interface for interoperability with the C programming language.
9
7
*
15
13
*/
16
14
library dart.ffi;
17
15
16
+ import 'dart:isolate' ;
18
17
import 'dart:typed_data' ;
19
18
20
19
part "native_type.dart" ;
@@ -75,9 +74,10 @@ class Pointer<T extends NativeType> extends NativeType {
75
74
external R asFunction< @DartRepresentationOf ("T" ) R extends Function > ();
76
75
77
76
/// Equality for Pointers only depends on their address.
78
- bool operator == (other) {
79
- if (other == null ) return false ;
80
- return address == other.address;
77
+ bool operator == (Object other) {
78
+ if (other is ! Pointer ) return false ;
79
+ Pointer otherPointer = other;
80
+ return address == otherPointer.address;
81
81
}
82
82
83
83
/// The hash code for a Pointer only depends on its address.
Original file line number Diff line number Diff line change 2
2
// for details. All rights reserved. Use of this source code is governed by a
3
3
// BSD-style license that can be found in the LICENSE file.
4
4
5
- // @dart = 2.5
6
-
7
5
part of dart.ffi;
8
6
9
7
/// [NativeType] 's subtypes represent a native type in C.
Original file line number Diff line number Diff line change 2
2
// for details. All rights reserved. Use of this source code is governed by a
3
3
// BSD-style license that can be found in the LICENSE file.
4
4
5
- // @dart = 2.5
6
-
7
5
part of dart.ffi;
8
6
9
7
/// This class is extended to define structs.
Original file line number Diff line number Diff line change 83
83
]
84
84
},
85
85
"ffi" : {
86
- "uri" : " ../../sdk/lib/ ffi/ffi.dart" ,
86
+ "uri" : " ffi/ffi.dart" ,
87
87
"patches" : [
88
- " ../../sdk/lib/ _internal/vm/lib/ffi_patch.dart" ,
89
- " ../../sdk/lib/ _internal/vm/lib/ffi_dynamic_library_patch.dart" ,
90
- " ../../sdk/lib/ _internal/vm/lib/ffi_native_type_patch.dart"
88
+ " _internal/vm/lib/ffi_patch.dart" ,
89
+ " _internal/vm/lib/ffi_dynamic_library_patch.dart" ,
90
+ " _internal/vm/lib/ffi_native_type_patch.dart"
91
91
]
92
92
},
93
93
"wasm" : {
Original file line number Diff line number Diff line change 88
88
- " ../../sdk/lib/_internal/vm/lib/timeline.dart"
89
89
90
90
ffi :
91
- uri : " ../../sdk/lib/ ffi/ffi.dart"
91
+ uri : " ffi/ffi.dart"
92
92
patches :
93
- - " ../../sdk/lib/ _internal/vm/lib/ffi_patch.dart"
94
- - " ../../sdk/lib/ _internal/vm/lib/ffi_dynamic_library_patch.dart"
95
- - " ../../sdk/lib/ _internal/vm/lib/ffi_native_type_patch.dart"
93
+ - " _internal/vm/lib/ffi_patch.dart"
94
+ - " _internal/vm/lib/ffi_dynamic_library_patch.dart"
95
+ - " _internal/vm/lib/ffi_native_type_patch.dart"
96
96
97
97
wasm :
98
98
uri : " wasm/wasm.dart"
You can’t perform that action at this time.
0 commit comments