Skip to content
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

Set out parameters to default instead of using SkipInit in Interop generators #101076

Merged
merged 2 commits into from
Apr 16, 2024

Conversation

jtschuster
Copy link
Member

Fixes #98049

To align with DllImport behavior, out parameters for LibraryImport and GeneratedComInterface should be default-initialized, never SkipInit'ed

@jtschuster jtschuster changed the title Set out parameters to default instead of using SkipInit Set out parameters to default instead of using SkipInit in Interop generators Apr 15, 2024
@jtschuster jtschuster merged commit aa6dab4 into dotnet:main Apr 16, 2024
94 of 97 checks passed
matouskozak pushed a commit to matouskozak/runtime that referenced this pull request Apr 30, 2024
…generators (dotnet#101076)

* Set `out` parameters to default instead of using SkipInit

* Assert value after P/Invoke
@github-actions github-actions bot locked and limited conversation to collaborators May 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[API Proposal]: DefaultInitializeAttribute for out parameters in native marshallers
3 participants