Use unmanaged StdCall calling convention

Default results in a managed calling convention which does not generate
unmanaged thunking code for parameter marshaling.
System.Runtime.InteropServices.CallingConvention.Winapi appears to
correspond to StdCall for calli callsites (this might be different for
pinvoke, which supports an unmanaged "platformapi" calling convention.)
Needs more testing to prove this is doing the right thing on non-Windows
platforms.
This commit is contained in:
Stefanos A. 2013-11-29 19:11:52 +01:00
parent c6d59b1f29
commit 78c0c6fd4c

View file

@ -364,7 +364,7 @@ namespace OpenTK.Rewrite
{
var signature = new CallSite(reference.ReturnType)
{
CallingConvention = MethodCallingConvention.Default,
CallingConvention = MethodCallingConvention.StdCall,
};
foreach (var p in reference.Parameters)