dart-sdk/tests/ffi/regress_49684_test.dart
Daco Harkes df4ef72c01 [vm/ffi] Remove deprecated FfiNative
TEST=pkg/analyzer/test/
TEST=CI build with class removed from `dart:ffi`

Closes: https://github.com/dart-lang/sdk/issues/53923
CoreLibraryReviewExempt: VM & dart2wasm only.
Change-Id: I45a39b623754f9f1b65cac55ea9adae390199f5d
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm64c-try,analyzer-analysis-server-linux-try,analyzer-mac-release-try,dart-sdk-linux-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336960
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2023-11-20 13:16:28 +00:00

28 lines
742 B
Dart

// Copyright (c) 2022, 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';
void main() {
// Does nothing, Native's aren't resolved.
}
@Native<Int Function(Pointer<Int>, Int)>()
external int subtract(
Pointer<Int> a,
int b,
);
@Native<Pointer<Double> Function(Pointer<Float>, Pointer<Float>)>()
external Pointer<Double> dividePrecision(
Pointer<Float> a,
Pointer<Float> b,
);
@Native<Void Function(Pointer)>(symbol: 'free')
external void posixFree(Pointer pointer);
@Native<Void Function(Pointer)>(symbol: 'CoTaskMemFree')
external void winCoTaskMemFree(Pointer pv);