Browse Source

Merge pull request #114 from ddobrev/master

Added a property to the event to contain the declaration it wraps
pull/116/head
João Matos 12 years ago
parent
commit
4aa6ce7fe3
  1. 2
      src/AST/Event.cs
  2. 3
      src/Generator/Generators/CSharp/CSharpTextTemplate.cs

2
src/AST/Event.cs

@ -18,5 +18,7 @@ namespace CppSharp.AST @@ -18,5 +18,7 @@ namespace CppSharp.AST
public QualifiedType QualifiedType { get; set; }
public List<Parameter> Parameters;
public Declaration OriginalDeclaration { get; set; }
}
}

3
src/Generator/Generators/CSharp/CSharpTextTemplate.cs

@ -2339,7 +2339,6 @@ namespace CppSharp.Generators.CSharp @@ -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 @@ -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);

Loading…
Cancel
Save