diff --git a/src/AST/Event.cs b/src/AST/Event.cs index a9d69d90..59e2ee55 100644 --- a/src/AST/Event.cs +++ b/src/AST/Event.cs @@ -18,5 +18,7 @@ namespace CppSharp.AST public QualifiedType QualifiedType { get; set; } public List Parameters; + + public Declaration OriginalDeclaration { get; set; } } } diff --git a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs index a573fdfc..1fdd75c1 100644 --- a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs +++ b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs @@ -2339,7 +2339,6 @@ namespace CppSharp.Generators.CSharp function = function.OriginalFunction; PushBlock(CSharpBlockKind.InternalsClassMethod); - GenerateDeclarationCommon(function); WriteLine("[SuppressUnmanagedCodeSecurity]"); string libName = Options.SharedLibraryName; @@ -2409,7 +2408,7 @@ namespace CppSharp.Generators.CSharp @params.Add("int " + GeneratedIdentifier("forBases")); } - WriteLine("public static extern {0} {1}({2});", retType, + WriteLine("internal static extern {0} {1}({2});", retType, GetFunctionNativeIdentifier(function), string.Join(", ", @params)); PopBlock(NewLineKind.BeforeNextBlock);