mirror of
https://github.com/dart-lang/sdk
synced 2024-09-18 21:41:19 +00:00
[vm/ffi] Remove deprecated Struct.addressOf
getter
This got deprecated in Dart 2.12 stable. Removing for the next release. Closes: https://github.com/dart-lang/sdk/issues/40667 Change-Id: Ifdbcf76178be6fca8603d478d629b6b6655b7123 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184463 Reviewed-by: Clement Skau <cskau@google.com> Commit-Queue: Daco Harkes <dacoharkes@google.com>
This commit is contained in:
parent
0914f10a8e
commit
65fab2397b
|
@ -58,10 +58,3 @@ abstract class Struct extends NativeType {
|
|||
|
||||
Struct._fromPointer(this._addressOf);
|
||||
}
|
||||
|
||||
/// Extension on [Struct] specialized for its subtypes.
|
||||
extension StructAddressOf<T extends Struct> on T {
|
||||
/// Returns the address backing the reference.
|
||||
@Deprecated('Hold on to the pointer backing a struct instead.')
|
||||
Pointer<T> get addressOf => _addressOf as Pointer<T>;
|
||||
}
|
||||
|
|
|
@ -98,8 +98,6 @@ void testTypeTest() {
|
|||
final pointer = calloc<Coordinate>();
|
||||
Coordinate c = pointer.ref;
|
||||
Expect.isTrue(c is Struct);
|
||||
// TODO(https://dartbug.com/40667): Remove support for this.
|
||||
Expect.isTrue(c.addressOf is Pointer<Coordinate>);
|
||||
calloc.free(pointer);
|
||||
}
|
||||
|
||||
|
|
|
@ -128,8 +128,6 @@ void testTypeTest() {
|
|||
final pointer = calloc<Coordinate>();
|
||||
Coordinate c = pointer.ref;
|
||||
Expect.isTrue(c is Struct);
|
||||
// TODO(https://dartbug.com/40667): Remove support for this.
|
||||
Expect.isTrue(c.addressOf is Pointer<Coordinate>);
|
||||
calloc.free(pointer);
|
||||
}
|
||||
|
||||
|
|
|
@ -128,8 +128,6 @@ void testTypeTest() {
|
|||
final pointer = calloc<Coordinate>();
|
||||
Coordinate c = pointer.ref;
|
||||
Expect.isTrue(c is Struct);
|
||||
// TODO(https://dartbug.com/40667): Remove support for this.
|
||||
Expect.isTrue(c.addressOf is Pointer<Coordinate>);
|
||||
calloc.free(pointer);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue