Browse Source

Use SafeIdentifier when writing parameter names in the C# marshaller.

TODO: There are still lots of instances in the marshaller where we do not do this. We should instead clean the parameter/declaration names before entering generation.
pull/224/head
triton 12 years ago
parent
commit
2ebce723ae
  1. 4
      src/Generator/Generators/CSharp/CSharpMarshal.cs

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

@ -476,7 +476,7 @@ namespace CppSharp.Generators.CSharp
} }
else else
Context.Return.Write(Context.Parameter.Name); Context.Return.Write(Helpers.SafeIdentifier(Context.Parameter.Name));
return true; return true;
} }
@ -632,7 +632,7 @@ namespace CppSharp.Generators.CSharp
public override bool VisitEnumDecl(Enumeration @enum) public override bool VisitEnumDecl(Enumeration @enum)
{ {
Context.Return.Write(Context.Parameter.Name); Context.Return.Write(Helpers.SafeIdentifier(Context.Parameter.Name));
return true; return true;
} }

Loading…
Cancel
Save