-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Add a new unmanaged
calling convention bit for use with function pointers
#38133
Comments
I couldn't figure out the best area label to add to this issue. Please help me learn by adding exactly one area label. |
Related #34805 |
This should include the new API proposal for |
Seems like we are going to also have to update |
/cc @davidwrighton Edit: Removed the updated |
The use of If we wanted to make this work with existing reflection APIs, I think it may be better to add a new |
That is what I was thinking as well. Perhaps it would be worth marking that API as |
I think we should hold off on adding new support to reflection emit for this in this release. We're very close to ship, and I'm not aware of any scenarios where we need calli support for this in the .NET 5 timeframe. Support in System.Reflection.Metadata is different though, as that is the api surface used by the compilers to generate code, we should fix that so that the Roslyn team doesn't need to maintain their own definition of the enum value. |
Technically, the actual calling convention is expressed as modopt on the return type but we felt a vague name is good enough. namespace System.Reflection.Metadata
{
public enum SignatureCallingConvention : byte
{
Unmanaged = 0x9
}
} |
We need a new
unmanaged
calling convention bit for use with function pointers in .NET 5.This bit will represent the "platform" default calling convention (essentially equivalent to
Winapi
for P/Invoke).Based on the conversations, this would be
bit 9
in the calling kind encoding.The text was updated successfully, but these errors were encountered: