Browse Source

Declaration.IsInternal is no longer true when Declaration.GenerationKind is Generate.

pull/244/head
marcos henrich 11 years ago
parent
commit
3e3e605a26
  1. 4
      src/AST/Declaration.cs
  2. 6
      src/Generator/Generators/CSharp/CSharpTextTemplate.cs

4
src/AST/Declaration.cs

@ -221,9 +221,7 @@ namespace CppSharp.AST
{ {
get get
{ {
var k = GenerationKind; return GenerationKind == GenerationKind.Internal;
return k == GenerationKind.Generate
|| k == GenerationKind.Internal;
} }
} }

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

@ -222,8 +222,8 @@ namespace CppSharp.Generators.CSharp
// Generate all the internal function declarations. // Generate all the internal function declarations.
foreach (var function in context.Functions) foreach (var function in context.Functions)
{ {
if (!function.IsInternal) continue; if (!function.IsGenerated && !function.IsInternal ) continue;
GenerateInternalFunction(function); GenerateInternalFunction(function);
} }
@ -2657,7 +2657,7 @@ namespace CppSharp.Generators.CSharp
public void GenerateInternalFunction(Function function) public void GenerateInternalFunction(Function function)
{ {
if (!function.IsInternal || function.IsPure) if (function.IsPure)
return; return;
if (function.OriginalFunction != null) if (function.OriginalFunction != null)

Loading…
Cancel
Save