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>
diff --git a/runtime/include/dart_api_dl.h b/runtime/include/dart_api_dl.h
index e090f5e..5088b433 100644
--- a/runtime/include/dart_api_dl.h
+++ b/runtime/include/dart_api_dl.h
@@ -100,7 +100,8 @@
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
diff --git a/runtime/include/dart_version.h b/runtime/include/dart_version.h
index e2d3651f..cb343c0 100644
--- a/runtime/include/dart_version.h
+++ b/runtime/include/dart_version.h
@@ -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 */
diff --git a/tests/ffi/vmspecific_handle_dynamically_linked_test.dart b/tests/ffi/vmspecific_handle_dynamically_linked_test.dart
index 77bc405..a0907413 100644
--- a/tests/ffi/vmspecific_handle_dynamically_linked_test.dart
+++ b/tests/ffi/vmspecific_handle_dynamically_linked_test.dart
@@ -35,8 +35,14 @@
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 {