-
Notifications
You must be signed in to change notification settings - Fork 515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[net8.0] added a test for blittability of pinvokes, partial #15684 #16525
[net8.0] added a test for blittability of pinvokes, partial #15684 #16525
Conversation
|
A quick test shows that enums are allowed: https://gist.github.com/rolfbjarne/716fcf0d8842639848fc0656bf3deac9 while |
|
🌱 [CI Build] Test results 🌱All tests have been skipped because the label 'skip-all-tests' was set. Pipeline on Agent |
📚 [PR Build] Artifacts 📚Artifacts were not provided. Pipeline on Agent XAMBOT-1103.Monterey' |
✅ API diff for current PR / commitLegacy Xamarin (No breaking changes)
NET (empty diffs)
❗ API diff vs stable (Breaking changes)Legacy Xamarin (:heavy_exclamation_mark: Breaking changes :heavy_exclamation_mark:).NET (:heavy_exclamation_mark: Breaking changes :heavy_exclamation_mark:)✅ Generator diffGenerator diff is empty Pipeline on Agent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
This adds a unit test to check for blittability of arguments to pinvokes.
What's going on here?
Loop over every unit pinvoke and checks each arg and return value for blittability.
An argument is blittable if it's:
a struct is blittable if all its non-static fields are blittable.
This test runs, but fails on about 1200 cases per platform. Most of these failures are with enums.
The rules might need to be adjusted to account for
ref
orout
args and 1 dimensional arrays of blittables.