Closed Zastai closed 2 years ago
Ah I see here that default
is used in CallKind
for the "managed" case, so that's fine. And it also lists varargs
as specifically unsupported by C#.
So the entry needed is for what is called unmanaged ext
in that section. Unmanaged
or DefaultUnmanaged
seem like decent choices then.
Oh, looks like the canonical name is Unmanaged
: https://github.com/dotnet/runtime/issues/38133
Wish MS was better at documenting things properly in one place once a language proposal is accepted.
When using a function pointer in C#, the following syntax is available, with corresponding calling convention values:
So the "unmanaged without explicit calling convention" case currently does not have a name in the enum yet.
Suggested name:
DefaultUnmanaged
(I'd preferDefault
with the currentDefault
becomingManaged
, because all values other than 0 imply unmanaged calls, but that's an API break).(I can't find anything that suggests the enum values
VarArg
andGeneric
are usable in C# (perhaps they are a Mono-only thing?).)