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. 2
      src/Generator/Generators/CSharp/CSharpGenerator.cs

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

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

Loading…
Cancel
Save