Skip to content

Commit 65fab23

Browse files
dcharkescommit-bot@chromium.org
authored andcommitted
[vm/ffi] Remove deprecated Struct.addressOf getter
This got deprecated in Dart 2.12 stable. Removing for the next release. Closes: #40667 Change-Id: Ifdbcf76178be6fca8603d478d629b6b6655b7123 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184463 Reviewed-by: Clement Skau <[email protected]> Commit-Queue: Daco Harkes <[email protected]>
1 parent 0914f10 commit 65fab23

File tree

4 files changed

+0
-13
lines changed

4 files changed

+0
-13
lines changed

sdk/lib/ffi/struct.dart

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,3 @@ abstract class Struct extends NativeType {
5858

5959
Struct._fromPointer(this._addressOf);
6060
}
61-
62-
/// Extension on [Struct] specialized for its subtypes.
63-
extension StructAddressOf<T extends Struct> on T {
64-
/// Returns the address backing the reference.
65-
@Deprecated('Hold on to the pointer backing a struct instead.')
66-
Pointer<T> get addressOf => _addressOf as Pointer<T>;
67-
}

tests/ffi/structs_nnbd_workaround_test.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,6 @@ void testTypeTest() {
9898
final pointer = calloc<Coordinate>();
9999
Coordinate c = pointer.ref;
100100
Expect.isTrue(c is Struct);
101-
// TODO(https://dartbug.com/40667): Remove support for this.
102-
Expect.isTrue(c.addressOf is Pointer<Coordinate>);
103101
calloc.free(pointer);
104102
}
105103

tests/ffi/structs_test.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,6 @@ void testTypeTest() {
128128
final pointer = calloc<Coordinate>();
129129
Coordinate c = pointer.ref;
130130
Expect.isTrue(c is Struct);
131-
// TODO(https://dartbug.com/40667): Remove support for this.
132-
Expect.isTrue(c.addressOf is Pointer<Coordinate>);
133131
calloc.free(pointer);
134132
}
135133

tests/ffi_2/structs_test.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,6 @@ void testTypeTest() {
128128
final pointer = calloc<Coordinate>();
129129
Coordinate c = pointer.ref;
130130
Expect.isTrue(c is Struct);
131-
// TODO(https://dartbug.com/40667): Remove support for this.
132-
Expect.isTrue(c.addressOf is Pointer<Coordinate>);
133131
calloc.free(pointer);
134132
}
135133

0 commit comments

Comments
 (0)