|
|
@ -2845,7 +2845,9 @@ namespace CppSharp.Generators.CSharp |
|
|
|
: ((FunctionType) attributedType.Equivalent.Type).CallingConvention; |
|
|
|
: ((FunctionType) attributedType.Equivalent.Type).CallingConvention; |
|
|
|
TypePrinter.PushContext(CSharpTypePrinterContextKind.Native); |
|
|
|
TypePrinter.PushContext(CSharpTypePrinterContextKind.Native); |
|
|
|
var interopCallConv = callingConvention.ToInteropCallConv(); |
|
|
|
var interopCallConv = callingConvention.ToInteropCallConv(); |
|
|
|
if (interopCallConv != System.Runtime.InteropServices.CallingConvention.Winapi) |
|
|
|
if (interopCallConv == System.Runtime.InteropServices.CallingConvention.Winapi) |
|
|
|
|
|
|
|
WriteLine("[SuppressUnmanagedCodeSecurity]"); |
|
|
|
|
|
|
|
else |
|
|
|
WriteLine( |
|
|
|
WriteLine( |
|
|
|
"[SuppressUnmanagedCodeSecurity, " + |
|
|
|
"[SuppressUnmanagedCodeSecurity, " + |
|
|
|
"UnmanagedFunctionPointerAttribute(global::System.Runtime.InteropServices.CallingConvention.{0})]", |
|
|
|
"UnmanagedFunctionPointerAttribute(global::System.Runtime.InteropServices.CallingConvention.{0})]", |
|
|
|