Expose Dart_Null_DL from dart_api_dl.h

R=dacoharkes@google.com

https://github.com/dart-lang/sdk/issues/54296

TEST=tests/ffi/vmspecific_handle_dynamically_linked_test.dart

Change-Id: Ibcf6a387a4b6385b17c13ed4b3ce6422291a5f78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341061
Auto-Submit: John McCutchan <johnmccutchan@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: John McCutchan <johnmccutchan@google.com>
This commit is contained in:
John McCutchan
2023-12-11 21:06:37 +00:00
committed by Commit Queue
parent 4f44d2eb22
commit 33ad2086c1
3 changed files with 9 additions and 2 deletions
+2 -1
View File
@@ -100,7 +100,8 @@ typedef void (*Dart_NativeMessageHandler_DL)(Dart_Port_DL dest_port_id,
F(Dart_EnterScope, void, (void)) \
F(Dart_ExitScope, void, (void)) \
/* Objects */ \
F(Dart_IsNull, bool, (Dart_Handle))
F(Dart_IsNull, bool, (Dart_Handle)) \
F(Dart_Null, Dart_Handle, (void))
// dart_api.h symbols that have been deprecated but are retained here
// until we can make a breaking change bumping the major version number
+1 -1
View File
@@ -11,6 +11,6 @@
// On backwards compatible changes the minor version is increased.
// The versioning covers the symbols exposed in dart_api_dl.h
#define DART_API_DL_MAJOR_VERSION 2
#define DART_API_DL_MINOR_VERSION 3
#define DART_API_DL_MINOR_VERSION 4
#endif /* RUNTIME_INCLUDE_DART_VERSION_H_ */ /* NOLINT */
@@ -35,8 +35,14 @@ void testHandle() {
void testNativeAPIs() {
// No need to expect here, `lookupFunction` throws an argument error if lookup fails.
Expect.isTrue(testLibrary.providesSymbol("Dart_IsNull_DL"));
testLibrary.lookupFunction<Bool Function(Handle), bool Function(Object)>(
"Dart_IsNull_DL");
Expect.isTrue(NativeApi.majorVersion == 2);
Expect.isTrue(NativeApi.minorVersion >= 4);
Expect.isTrue(testLibrary.providesSymbol("Dart_Null_DL"));
testLibrary
.lookupFunction<Handle Function(), Object Function()>("Dart_Null_DL");
}
class SomeClass {