Repository navigation
[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 |
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
reforoutargs and 1 dimensional arrays of blittables.