dart-sdk/samples/ffi/coordinate.dart
Daco Harkes 24a7e4387d [vm/ffi] Migrate off .addressOf in samples
Removes invocations of `.addressOf` in samples.

Removes the constructor from the Coordinate testing class which
has become useless with no access to the underlying pointer.

Issue: https://github.com/dart-lang/sdk/issues/40667


Change-Id: I1e55a4b159662654e1d14b2d51b0b43d734d5010
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181405
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2021-01-28 21:32:55 +00:00

17 lines
418 B
Dart

// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'dart:ffi';
/// Sample struct for dart:ffi library.
class Coordinate extends Struct {
@Double()
external double x;
@Double()
external double y;
external Pointer<Coordinate> next;
}