mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 10:49:00 +00:00
be893fdf27
This adds the providesSymbol method to DynamicLibrary. It returns whether the library contains a function with the given name. As per dlsym(3), it is valid for dlsym to return nullptr in a success case if the symbol actually has a NULL value. So I've changed the logic to check for dlerror() after we invoke dlsym(), both in the existing lookup and in the new method. Closes https://github.com/dart-lang/sdk/issues/46192 TEST=tests/ffi(_2)/has_symbol_test.dart Change-Id: Ibcb1c051cc0cdd95a104fe86ef2fc76da5bafb5d Cq-Include-Trybots: luci.dart.try:vm-precomp-ffi-qemu-linux-release-arm-try,vm-ffi-android-debug-arm64-try,vm-ffi-android-debug-arm-try,vm-kernel-linux-debug-x64-try,vm-kernel-win-debug-x64-try,vm-kernel-mac-debug-x64-try Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201900 Reviewed-by: Daco Harkes <dacoharkes@google.com> Commit-Queue: Daco Harkes <dacoharkes@google.com> |
||
---|---|---|
.. | ||
co19 | ||
co19_2 | ||
corelib | ||
corelib_2 | ||
dartdevc | ||
dartdevc_2 | ||
ffi | ||
ffi_2 | ||
language | ||
language_2 | ||
lib | ||
lib_2 | ||
modular | ||
standalone | ||
standalone_2 | ||
web | ||
web_2 | ||
legacy_status_dart2js.csv | ||
README.md |
This directory contains tests of the language and core library implementations. For more information, see https://github.com/dart-lang/sdk/wiki/Testing.