mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 09:31:58 +00:00
df4ef72c01
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>
28 lines
742 B
Dart
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);
|