Files
sdk/runtime/bin/ffi_test/ffi_test_fields.c
T
Simon Binder 6ce0504924 [vm/ffi] Support native array fields
This lifts the restriction preventing `@Native` fields from having
`Array` types.

Closes https://github.com/dart-lang/sdk/issues/54337

TEST=tests/ffi/vmspecific_static_checks_native_test.dart
TEST=pkg/analyzer/test/src/diagnostics/ffi_native_test.dart
Cq-Include-Trybots: luci.dart.try:analyzer-mac-release-try
Change-Id: Ic485c86bac9a42ab06097a84a01aba3c481b98e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341860
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Marya Belanger <mbelanger@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2023-12-21 08:47:58 +00:00

11 lines
517 B
C

// Copyright (c) 2023, 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.
#include "ffi_test_fields.h"
DART_EXPORT_FIELD int32_t globalInt;
DART_EXPORT_FIELD struct Coord globalStruct;
DART_EXPORT_FIELD const char* globalString = "Hello Dart!";
DART_EXPORT_FIELD int globalArray[] = {1, 2, 3};
DART_EXPORT_FIELD double identity3x3[3][3] = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}};