Browse Source

Don't add ABI-specific parameters when wrapping C

Fixes https://github.com/mono/CppSharp/issues/1008.

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
pull/1389/head
Dimitar Dobrev 5 years ago
parent
commit
b4726fd48e
  1. 4
      src/Generator/Generators/CSharp/CSharpGenerator.cs

4
src/Generator/Generators/CSharp/CSharpGenerator.cs

@ -1,6 +1,7 @@ @@ -1,6 +1,7 @@
using System.Collections.Generic;
using CppSharp.AST;
using CppSharp.Passes;
using CppSharp.Parser;
namespace CppSharp.Generators.CSharp
{
@ -36,7 +37,8 @@ namespace CppSharp.Generators.CSharp @@ -36,7 +37,8 @@ namespace CppSharp.Generators.CSharp
// CheckAbiParameters runs last because hidden structure parameters
// should always occur first.
Context.TranslationUnitPasses.AddPass(new CheckAbiParameters());
if (Context.ParserOptions.LanguageVersion > LanguageVersion.C99_GNU)
Context.TranslationUnitPasses.AddPass(new CheckAbiParameters());
return true;
}

Loading…
Cancel
Save